mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Hides randomize button overlay, resolves #1409
This commit is contained in:
parent
9403d39b61
commit
164e049202
3 changed files with 9 additions and 16 deletions
app
styles/editor/level
templates/editor/level
views/editor/level/thangs
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue