From aea46a37ae8038da570fc7cf07ef6e8c0d9ef577 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 30 Apr 2012 13:46:55 -0700 Subject: CSS Style - Add style interaction --- js/panels/css-panel/declaration.reel/declaration.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'js/panels/css-panel/declaration.reel/declaration.js') diff --git a/js/panels/css-panel/declaration.reel/declaration.js b/js/panels/css-panel/declaration.reel/declaration.js index 9685510b..873d2ce4 100644 --- a/js/panels/css-panel/declaration.reel/declaration.js +++ b/js/panels/css-panel/declaration.reel/declaration.js @@ -18,7 +18,10 @@ exports.Declaration = Montage.create(Component, { templateDidLoad : { value: function() { console.log("declaration - template did load"); - this.treeController.delegate = this.focusDelegate || this; + + if(this.focusDelegate) { + this.treeController.delegate = this.focusDelegate; + } } }, prepareForDraw : { @@ -119,9 +122,17 @@ exports.Declaration = Montage.create(Component, { distinct: true }, - addNewStyle : { - value: function() { - debugger; + addNewStyleAfter : { + value: function(style) { + //this.treeController.branchControllers[0].addObjects({ + foo1 = style.parentComponent.parentComponent; + style.parentComponent.parentComponent.contentController.addObjects({ + name: 'property', + value: 'value', + isEmpty: true, + treeNodeType: 'leaf' + }); + style.parentComponent.parentComponent.needsDraw = true; } }, -- cgit v1.2.3