mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed next-level popovers appearing in wrong place on world map.
This commit is contained in:
parent
cfe1b020c3
commit
c5ae253a45
1 changed files with 4 additions and 3 deletions
|
@ -40,7 +40,7 @@ module.exports = class WorldMapView extends RootView
|
|||
@levelStatusMap = {}
|
||||
@levelPlayCountMap = {}
|
||||
@sessions = @supermodel.loadCollection(new LevelSessionsCollection(), 'your_sessions', null, 0).model
|
||||
|
||||
|
||||
# Temporary attempt to make sure all earned rewards are accounted for. Figure out a better solution...
|
||||
@earnedAchievements = new CocoCollection([], {url: '/db/earned_achievement', model:EarnedAchievement, project: ['earnedRewards']})
|
||||
@listenToOnce @earnedAchievements, 'sync', ->
|
||||
|
@ -56,7 +56,7 @@ module.exports = class WorldMapView extends RootView
|
|||
earned[group].push(reward)
|
||||
addedSomething = true
|
||||
@supermodel.loadCollection(@earnedAchievements, 'achievements')
|
||||
|
||||
|
||||
@listenToOnce @sessions, 'sync', @onSessionsLoaded
|
||||
@getLevelPlayCounts()
|
||||
$(window).on 'resize', @onWindowResize
|
||||
|
@ -136,7 +136,7 @@ module.exports = class WorldMapView extends RootView
|
|||
if levelID = @$el.find('.level.next').data('level-id')
|
||||
@$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show()
|
||||
pos = @$el.find('.level.next').offset()
|
||||
@adjustLevelInfoPosition pageX: pos.left, pageY: pos.top + 250
|
||||
@adjustLevelInfoPosition pageX: pos.left, pageY: pos.top
|
||||
@manuallyPositionedLevelInfoID = levelID
|
||||
|
||||
afterInsert: ->
|
||||
|
@ -203,6 +203,7 @@ module.exports = class WorldMapView extends RootView
|
|||
@$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show()
|
||||
@adjustLevelInfoPosition e
|
||||
@endHighlight()
|
||||
@manuallyPositionedLevelInfoID = false
|
||||
|
||||
onMouseLeaveLevel: (e) ->
|
||||
return if application.isIPadApp
|
||||
|
|
Loading…
Reference in a new issue