Skip to content

Commit

Permalink
Allow Identifier and Legend tools to be on different sides if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroberts committed Apr 25, 2024
1 parent e6bcfe6 commit 96622d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
16 changes: 15 additions & 1 deletion src/essence/Tools/Identifier/IdentifierTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,21 @@ var IdentifierTool = {
//Get tool variables and UI adjustments
this.justification = L_.getToolVars('identifier')['justification']
var toolContent = d3.select('#toolSeparated_Identifier')
toolContent.style('bottom', '2px')
toolContent.style('bottom', '2px')
if (this.justification == 'right') {
var toolController = d3.select('#toolcontroller_sepdiv')
toolController.style('top', '110px')
toolController.style('left', null)
toolController.style('right', '5px')
toolContent.style('left', null)
toolContent.style('right', '0px')
} else if (this.justification != L_.getToolVars('legend')['justification']) {
var toolController = d3.select('#toolcontroller_sepdiv').clone(false).attr('id', 'toolcontroller_sepdiv_left')
$('#toolSeparated_Identifier').appendTo('#toolcontroller_sepdiv_left')
toolController.style('top', '40px')
toolController.style('left', '5px')
toolController.style('right', null)
}
},
make: function (targetId) {
this.MMWebGISInterface = new interfaceWithMMWebGIS()
Expand Down
8 changes: 7 additions & 1 deletion src/essence/Tools/Legend/LegendTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ var LegendTool = {
toolController.style('right', '5px')
toolContent.style('left', null)
toolContent.style('right', '0px')
}
} else if (this.justification != L_.getToolVars('identifier')['justification']) {
var toolController = d3.select('#toolcontroller_sepdiv').clone(false).attr('id', 'toolcontroller_sepdiv_left')
$('#toolSeparated_Legend').appendTo('#toolcontroller_sepdiv_left')
toolController.style('top', '40px')
toolController.style('left', '5px')
toolController.style('right', null)
}
},
make: function (targetId) {
this.targetId = targetId
Expand Down

0 comments on commit 96622d7

Please sign in to comment.