mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 08:50:58 -05:00
Fixed Spell Debug View width bug
This commit is contained in:
parent
f6324807b3
commit
5274f22467
2 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
.spell-debug-view
|
||||
position: absolute
|
||||
z-index: 9001
|
||||
min-width: 250px
|
||||
max-width: 400px
|
||||
padding: 10px
|
||||
background: transparent url(/images/level/popover_background.png)
|
||||
|
|
|
@ -61,7 +61,9 @@ module.exports = class DebugView extends View
|
|||
@variableChain = chain
|
||||
offsetX = e.domEvent.offsetX ? e.clientX - $(e.domEvent.target).offset().left
|
||||
offsetY = e.domEvent.offsetY ? e.clientY - $(e.domEvent.target).offset().top
|
||||
@pos = {left: offsetX + 50, top: offsetY + 50}
|
||||
w = $(document).width()
|
||||
offsetX = w - $(e.domEvent.target).offset().left - 300 if e.clientX + 300 > w
|
||||
@pos = {left: offsetX + 50, top: offsetY + 20}
|
||||
@markerRange = new Range pos.row, start, pos.row, end
|
||||
else
|
||||
@variableChain = @markerRange = null
|
||||
|
|
Loading…
Reference in a new issue