mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Merge pull request #658 from ItsLastDay/editor_tweaks
Added tooltip in level-editor (issue #174)
This commit is contained in:
commit
fd2d9b6833
2 changed files with 6 additions and 2 deletions
|
@ -10,7 +10,7 @@ table.table
|
|||
th(data-i18n="general.name") Name
|
||||
th(data-i18n="general.description") Description
|
||||
th(data-i18n="general.version") Version
|
||||
|
||||
|
||||
for data in documents
|
||||
- data = data.attributes;
|
||||
tr
|
||||
|
@ -18,4 +18,4 @@ table.table
|
|||
a(href="/editor/level/#{data.slug || data._id}")
|
||||
| #{data.name}
|
||||
td.body-row #{data.description}
|
||||
td #{data.version.major}.#{data.version.minor}
|
||||
td #{data.version.major}.#{data.version.minor}
|
||||
|
|
|
@ -219,6 +219,7 @@ module.exports = class ThangsTabView extends View
|
|||
|
||||
# TODO: figure out a good way to have all Surface clicks and Treema clicks just proxy in one direction, so we can maintain only one way of handling selection and deletion
|
||||
onExtantThangSelected: (e) ->
|
||||
@selectedExtantSprite?.setNameLabel null unless @selectedExtantSprite is e.sprite
|
||||
@selectedExtantThang = e.thang
|
||||
@selectedExtantSprite = e.sprite
|
||||
if e.thang and (key.alt or key.meta)
|
||||
|
@ -230,6 +231,9 @@ module.exports = class ThangsTabView extends View
|
|||
@selectedExtantThangClickTime = new Date()
|
||||
treemaThang = _.find @thangsTreema.childrenTreemas, (treema) => treema.data.id is @selectedExtantThang.id
|
||||
if treemaThang
|
||||
# Show the label above selected thang, notice that we may get here from thang-edit-view, so it will be selected but no label
|
||||
# also covers selecting from Treema
|
||||
@selectedExtantSprite.setNameLabel @selectedExtantSprite.thangType.get('name') + ': ' + @selectedExtantThang.id
|
||||
if not treemaThang.isSelected()
|
||||
treemaThang.select()
|
||||
@thangsTreema.$el.scrollTop(@thangsTreema.$el.find('.treema-children .treema-selected')[0].offsetTop)
|
||||
|
|
Loading…
Reference in a new issue