mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Fixes #1079
This commit is contained in:
parent
35fc5a5197
commit
94f70ca9f4
2 changed files with 3 additions and 3 deletions
|
@ -174,12 +174,12 @@ module.exports = class Camera extends CocoClass
|
|||
@zoomTo target, newZoom, 0
|
||||
|
||||
onMouseDown: (e) ->
|
||||
return unless e.canvas is @canvas
|
||||
return unless e.canvas is @canvas[0]
|
||||
return if @dragDisabled
|
||||
@lastPos = {x: e.originalEvent.rawX, y: e.originalEvent.rawY}
|
||||
|
||||
onMouseDragged: (e) ->
|
||||
return unless e.canvas is @canvas
|
||||
return unless e.canvas is @canvas[0]
|
||||
return if @dragDisabled
|
||||
target = @boundTarget(@target, @zoom)
|
||||
newPos =
|
||||
|
|
|
@ -501,7 +501,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
return if @letterboxOn
|
||||
p = @imageObject
|
||||
p = p.parent while p.parent
|
||||
newEvent = sprite: @, thang: @thang, originalEvent: e, canvas:p
|
||||
newEvent = sprite: @, thang: @thang, originalEvent: e, canvas:p.canvas
|
||||
@trigger ourEventName, newEvent
|
||||
Backbone.Mediator.publish ourEventName, newEvent
|
||||
|
||||
|
|
Loading…
Reference in a new issue