Removes panning upon right click in editor

This commit is contained in:
Jayant Jain 2014-06-11 03:39:56 +05:30
parent 389d530eaa
commit d5d20377a2
2 changed files with 2 additions and 2 deletions
app
lib/surface
views/editor/level

View file

@ -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

View file

@ -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