Skip to content

Commit ed0543e

Browse files
#718 Globe Controls clash with Separated Tool buttons in the UI (#719)
1 parent 25285ca commit ed0543e

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/essence/Basics/Globe_/Globe_.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,25 @@ let Globe_ = {
204204
$(`#${this.id}`).on('mousemove', () => {
205205
coordinates.hideElevation()
206206
})
207+
208+
// Because there might be separated tools, push all the control below them:
209+
// First find all left justified separated tools
210+
let numSep = 0
211+
L_.configData.tools.forEach((t) => {
212+
if (
213+
t.separatedTool === true &&
214+
(t.variables == null || t.variables.justification != 'right')
215+
)
216+
numSep++
217+
})
218+
$('#_lithosphere_controls_topleft').attr(
219+
'style',
220+
function (index, currentStyles) {
221+
return `${currentStyles} top: ${
222+
40 + numSep * 35
223+
}px !important; left: 7px;`
224+
}
225+
)
207226
},
208227
getMockLitho: function () {
209228
return {

0 commit comments

Comments
 (0)