diff --git a/app/styles/editor/components/main.sass b/app/styles/editor/components/main.sass
index 3351694db..a71b608b3 100644
--- a/app/styles/editor/components/main.sass
+++ b/app/styles/editor/components/main.sass
@@ -41,8 +41,10 @@
bottom: 0
overflow: scroll
- .treema-row .add-button
- margin-left: 10px
+ .treema-row
+ line-height: 24px
+ .add-button
+ margin-left: 10px
#component-config-column-view
border-left: 1px solid black
diff --git a/app/styles/editor/level/thangs_tab.sass b/app/styles/editor/level/thangs_tab.sass
index e8175462f..d26d2a83b 100644
--- a/app/styles/editor/level/thangs_tab.sass
+++ b/app/styles/editor/level/thangs_tab.sass
@@ -216,20 +216,12 @@ $mobile: 1050px
#canvas-wrapper
width: 100%
position: relative
-
- #canvas-overlay
- display: none
+ text-align: center
+
+ #randomize-button
position: absolute
- width: 100%
- height: 100%
- background: white
- opacity: 0.5
- text-align: center
-
- #randomize-button
- position: absolute
- top: 45%
- height: 40px
+ top: 45%
+ height: 40px
diff --git a/app/templates/editor/level/thangs_tab.jade b/app/templates/editor/level/thangs_tab.jade
index 3cb870ddd..8d47c5f2c 100644
--- a/app/templates/editor/level/thangs_tab.jade
+++ b/app/templates/editor/level/thangs_tab.jade
@@ -25,8 +25,7 @@ button.navbar-toggle.toggle.btn-primary#thangs-palette-toggle(type="button", dat
.world-container.thangs-column
h3(data-i18n="editor.level_tab_thangs_conditions") Starting Conditions
#canvas-wrapper
- #canvas-overlay
- button.btn.btn-primary(id="randomize-button", data-toggle="coco-modal", data-target="editor/level/modals/TerrainRandomizeModal", data-i18n="editor.randomize", title="Randomize Terrain") Randomize
+ button.btn.btn-primary(id="randomize-button", data-toggle="coco-modal", data-target="editor/level/modals/TerrainRandomizeModal", data-i18n="editor.randomize", title="Randomize Terrain") Randomize
ul.dropdown-menu#contextmenu
li#delete
a(data-i18n="editor.delete") Delete
diff --git a/app/views/editor/component/ThangComponentEditView.coffee b/app/views/editor/component/ThangComponentEditView.coffee
index 46b0e8f99..91530cb3f 100644
--- a/app/views/editor/component/ThangComponentEditView.coffee
+++ b/app/views/editor/component/ThangComponentEditView.coffee
@@ -76,7 +76,9 @@ module.exports = class ThangComponentEditView extends CocoView
@addComponentsTreema = @$el.find('#add-component-column .treema').treema treemaOptions
@addComponentsTreema.build()
@$el.find('#add-component-column .treema-node').draggable({
- revert: true
+ revert: 'invalid'
+ helper: 'clone'
+ appendTo: 'body'
start: (e) ->
# Hack to ensure dragged treema node is selected
$(@).trigger('click') unless $(@).hasClass 'treema-selected'
@@ -191,8 +193,9 @@ module.exports = class ThangComponentEditView extends CocoView
# reselect newly added child treema in the extantComponentsTreema
for index, treema of @extantComponentsTreema.childrenTreemas
if treema.component.id is id
- treema.select()
- @onSelectExtantComponent({}, [treema])
+ _.defer =>
+ treema.select()
+ @onSelectExtantComponent({}, [treema])
return
onAddComponentDoubleClicked: (e, treema) =>
@@ -260,7 +263,7 @@ class ComponentArrayNode extends TreemaArrayNode
class ComponentNode extends TreemaObjectNode
valueClass: 'treema-component'
- addButtonTemplate: ''
+ addButtonTemplate: ''
collection: false
build: ->
diff --git a/app/views/editor/level/thangs/ThangsTabView.coffee b/app/views/editor/level/thangs/ThangsTabView.coffee
index 5f28b1279..da24cbd0a 100644
--- a/app/views/editor/level/thangs/ThangsTabView.coffee
+++ b/app/views/editor/level/thangs/ThangsTabView.coffee
@@ -157,6 +157,8 @@ module.exports = class ThangsTabView extends CocoView
thangsHeaderHeight = $('#thangs-header').height()
oldHeight = $('#thangs-list').height()
$('#thangs-list').height(oldHeight - thangsHeaderHeight)
+ if data.thangs.length
+ @$el.find('#randomize-button').hide()
initSurface: ->
surfaceCanvas = $('canvas#surface', @$el)
@@ -235,7 +237,6 @@ module.exports = class ThangsTabView extends CocoView
@addThang @addThangType, thang.pos, true
@batchInsert()
@selectAddThangType null
- @$el.find('#canvas-overlay').css('display', 'none')
# 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
@@ -410,6 +411,7 @@ module.exports = class ThangsTabView extends CocoView
@thangsBatch = []
addThang: (thangType, pos, batchInsert=false) ->
+ @$el.find('#randomize-button').hide()
if batchInsert
thangID = "Random #{thangType.get('name')} #{@thangsBatch.length}"
else