mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 16:33:38 -04:00
Selected component in the thang components edit view shows up with a blue header.
This commit is contained in:
parent
6f2de166c0
commit
5f11a5ecca
2 changed files with 5 additions and 1 deletions
app
styles/editor/component
views/editor/component
|
@ -51,4 +51,6 @@
|
||||||
right: 0
|
right: 0
|
||||||
left: 20px
|
left: 20px
|
||||||
overflow: scroll
|
overflow: scroll
|
||||||
|
|
||||||
|
.selected-component .panel-heading
|
||||||
|
background-color: lightblue
|
|
@ -275,6 +275,7 @@ module.exports = class ThangComponentsEditView extends CocoView
|
||||||
|
|
||||||
onSelectComponent: (e, nodes) =>
|
onSelectComponent: (e, nodes) =>
|
||||||
@componentsTreema.$el.find('.dependent').removeClass('dependent')
|
@componentsTreema.$el.find('.dependent').removeClass('dependent')
|
||||||
|
@$el.find('.selected-component').removeClass('selected-component')
|
||||||
return unless nodes.length is 1
|
return unless nodes.length is 1
|
||||||
|
|
||||||
# find dependent components
|
# find dependent components
|
||||||
|
@ -302,6 +303,7 @@ module.exports = class ThangComponentsEditView extends CocoView
|
||||||
continue unless subview instanceof ThangComponentConfigView
|
continue unless subview instanceof ThangComponentConfigView
|
||||||
if subview.component.get('original') is nodes[0].getData().original
|
if subview.component.get('original') is nodes[0].getData().original
|
||||||
subview.$el[0].scrollIntoView()
|
subview.$el[0].scrollIntoView()
|
||||||
|
subview.$el.addClass('selected-component')
|
||||||
break
|
break
|
||||||
|
|
||||||
onChangeExtantComponents: =>
|
onChangeExtantComponents: =>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue