mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-23 19:32:03 -04: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.name") Name
|
||||||
th(data-i18n="general.description") Description
|
th(data-i18n="general.description") Description
|
||||||
th(data-i18n="general.version") Version
|
th(data-i18n="general.version") Version
|
||||||
|
|
||||||
for data in documents
|
for data in documents
|
||||||
- data = data.attributes;
|
- data = data.attributes;
|
||||||
tr
|
tr
|
||||||
|
@ -18,4 +18,4 @@ table.table
|
||||||
a(href="/editor/level/#{data.slug || data._id}")
|
a(href="/editor/level/#{data.slug || data._id}")
|
||||||
| #{data.name}
|
| #{data.name}
|
||||||
td.body-row #{data.description}
|
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
|
# 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) ->
|
onExtantThangSelected: (e) ->
|
||||||
|
@selectedExtantSprite?.setNameLabel null unless @selectedExtantSprite is e.sprite
|
||||||
@selectedExtantThang = e.thang
|
@selectedExtantThang = e.thang
|
||||||
@selectedExtantSprite = e.sprite
|
@selectedExtantSprite = e.sprite
|
||||||
if e.thang and (key.alt or key.meta)
|
if e.thang and (key.alt or key.meta)
|
||||||
|
@ -230,6 +231,9 @@ module.exports = class ThangsTabView extends View
|
||||||
@selectedExtantThangClickTime = new Date()
|
@selectedExtantThangClickTime = new Date()
|
||||||
treemaThang = _.find @thangsTreema.childrenTreemas, (treema) => treema.data.id is @selectedExtantThang.id
|
treemaThang = _.find @thangsTreema.childrenTreemas, (treema) => treema.data.id is @selectedExtantThang.id
|
||||||
if treemaThang
|
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()
|
if not treemaThang.isSelected()
|
||||||
treemaThang.select()
|
treemaThang.select()
|
||||||
@thangsTreema.$el.scrollTop(@thangsTreema.$el.find('.treema-children .treema-selected')[0].offsetTop)
|
@thangsTreema.$el.scrollTop(@thangsTreema.$el.find('.treema-children .treema-selected')[0].offsetTop)
|
||||||
|
|
Loading…
Add table
Reference in a new issue