Skip to content
This repository was archived by the owner on May 21, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/webui/client/modules/performances/views/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,15 @@ define(['application', 'marionette', './templates/node.tpl', 'lib/api', 'undersc
this.ui.container.addClass('app-disabled')
}
},
showSettings: function(node) {
showSettings: function (node) {
let self = this
if (node === this.node) return
this.node = node
this.listenTo(node, 'change', this.updateNode)
this.listenTo(this.collection, 'add remove', function (model) {
if (self.node === model)
self.updateNode(model)
});
this.updateNode(node)
this.ui.container.removeClass('app-disabled')
this.ui.nodeTabs.removeClass('active')
Expand Down
8 changes: 7 additions & 1 deletion src/webui/client/modules/performances/views/node_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ define(['application', 'marionette', './templates/node_settings.tpl', '../entiti
if (this.model.hasProperty('blender_mode')) this.ui.kfModeSelect.val(this.model.get('blender_mode'))
if (this.model.hasProperty('message')) this.ui.messageInput.val(this.model.get('message'))
if (this.model.hasProperty('attention_region')) this.selectAttentionRegion()

this.updateButtons()
},
updateButtons: function () {
if (this.collection.contains(this.model))
this.ui.createButton.hide()
else
Expand All @@ -73,6 +75,10 @@ define(['application', 'marionette', './templates/node_settings.tpl', '../entiti
onAttach: function() {
let self = this,
settings = this.model.getSettings()

this.listenTo(this.collection, 'add remove', function (model) {
if (self.model === model) self.updateButtons()
})

this.properties = this.model.getConfig().properties

Expand Down