createProperty: function (name, value, priority, enabled, siblingProp) { let prop = new TextProperty(this, name, value, priority, enabled); let ind; if (siblingProp) { ind = this.textProps.indexOf(siblingProp) + 1; this.textProps.splice(ind, 0, prop); } else { ind = this.textProps.length; this.textProps.push(prop); } this.applyProperties((modifications) => { modifications.createProperty(ind, name, value, priority); // Now that the rule has been updated, the server might have given us data // that changes the state of the property. Update it now. prop.updateEditor(); }); return prop; },
this.applyProperties((modifications) => { modifications.createProperty(ind, name, value, priority); // Now that the rule has been updated, the server might have given us data // that changes the state of the property. Update it now. prop.updateEditor(); });