mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-20 18:10:44 -04:00
Removes panning upon right click in editor
This commit is contained in:
parent
389d530eaa
commit
d5d20377a2
2 changed files with 2 additions and 2 deletions
app
|
@ -266,7 +266,7 @@ module.exports = class SpriteBoss extends CocoClass
|
|||
return if e and (@disabled or @selectLocked) # Ignore clicks for selection/panning/wizard movement while disabled or select is locked
|
||||
worldPos = sprite?.thang?.pos
|
||||
worldPos ?= @camera.screenToWorld {x: e.originalEvent.rawX, y: e.originalEvent.rawY} if e
|
||||
if worldPos and (@options.navigateToSelection or not sprite or treemaThangSelected)
|
||||
if worldPos and (@options.navigateToSelection or not sprite or treemaThangSelected) and e?.originalEvent?.nativeEvent?.which isnt 3
|
||||
@camera.zoomTo(sprite?.imageObject or @camera.worldToSurface(worldPos), @camera.zoom, 1000, true)
|
||||
sprite = null if @options.choosing # Don't select sprites while choosing
|
||||
if sprite isnt @selectedSprite
|
||||
|
|
|
@ -202,7 +202,7 @@ module.exports = class ThangsTabView extends View
|
|||
|
||||
onSpriteMouseUp: (e) ->
|
||||
clearTimeout @backgroundAddClickTimeout
|
||||
if e.originalEvent.nativeEvent.button == 2
|
||||
if e.originalEvent.nativeEvent.button == 2 and @selectedExtantThang
|
||||
@onSpriteContextMenu e
|
||||
clearInterval(@movementInterval) if @movementInterval?
|
||||
@movementInterval = null
|
||||
|
|
Loading…
Reference in a new issue