From baf8adcc7479116d3e548945464dda49e4335802 Mon Sep 17 00:00:00 2001 From: Mikhail Koltsov Date: Sat, 22 Mar 2014 20:50:50 +0400 Subject: [PATCH 1/3] added nothing --- app/templates/editor/level/table.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/editor/level/table.jade b/app/templates/editor/level/table.jade index 37decec4d..594d09ea4 100755 --- a/app/templates/editor/level/table.jade +++ b/app/templates/editor/level/table.jade @@ -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} \ No newline at end of file + td #{data.version.major}.#{data.version.minor} From 36cfdfda46c9c5dcfc19fbd70f218bef3e4c15fc Mon Sep 17 00:00:00 2001 From: Mikhail Koltsov Date: Sat, 22 Mar 2014 23:17:15 +0400 Subject: [PATCH 2/3] Added labels above selected thangs in level-editor (issue #174) --- app/views/editor/level/thangs_tab_view.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/views/editor/level/thangs_tab_view.coffee b/app/views/editor/level/thangs_tab_view.coffee index cd4614f3b..7c8617a03 100644 --- a/app/views/editor/level/thangs_tab_view.coffee +++ b/app/views/editor/level/thangs_tab_view.coffee @@ -8,6 +8,7 @@ CocoCollection = require 'models/CocoCollection' Surface = require 'lib/surface/Surface' Thang = require 'lib/world/thang' LevelThangEditView = require './thang/edit' +Label = require "lib/surface/Label" ComponentsCollection = require 'collections/ComponentsCollection' # Moving the screen while dragging thangs constants @@ -217,6 +218,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) @@ -228,6 +230,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) From 2316773cb1d1657125952c9c2eca495e72154524 Mon Sep 17 00:00:00 2001 From: Mikhail Koltsov Date: Sat, 22 Mar 2014 23:25:18 +0400 Subject: [PATCH 3/3] removed Label requierment --- app/views/editor/level/thangs_tab_view.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/editor/level/thangs_tab_view.coffee b/app/views/editor/level/thangs_tab_view.coffee index 7c8617a03..cb4728871 100644 --- a/app/views/editor/level/thangs_tab_view.coffee +++ b/app/views/editor/level/thangs_tab_view.coffee @@ -8,7 +8,6 @@ CocoCollection = require 'models/CocoCollection' Surface = require 'lib/surface/Surface' Thang = require 'lib/world/thang' LevelThangEditView = require './thang/edit' -Label = require "lib/surface/Label" ComponentsCollection = require 'collections/ComponentsCollection' # Moving the screen while dragging thangs constants