From 0e5520008925f480d5d1bb8356220c773d1c5e37 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 23 Apr 2012 11:51:02 -0700 Subject: CSS Panel - Add editing and adding new styles in declaration and style --- js/panels/css-panel/declaration.reel/declaration.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 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 0cc98951..55fe0e18 100644 --- a/js/panels/css-panel/declaration.reel/declaration.js +++ b/js/panels/css-panel/declaration.reel/declaration.js @@ -9,6 +9,9 @@ var Montage = require("montage/core/core").Montage, ShorthandProps = require("js/panels/CSSPanel/css-shorthand-map"); exports.Declaration = Montage.create(Component, { + includeEmptyStyle : { + value: true + }, templateDidLoad : { value: function() { console.log("declaration - template did load"); @@ -31,10 +34,18 @@ exports.Declaration = Montage.create(Component, { }, set: function(dec) { this._declaration = dec; - console.log('here'); + ///// creates data structure to use with tree component this.buildStyleTree(); - console.log('there'); + + if(this.includeEmptyStyle) { + this.styleTree.properties.push({ + "name": "property", + "value" : "value", + "isEmpty": true + }); + } +//debugger; this.needsDraw = true; } }, -- cgit v1.2.3