From 044ff861ced6b82f9d05aca6c7e78430a4e53726 Mon Sep 17 00:00:00 2001 From: David Polak Date: Mon, 7 Jan 2019 15:04:21 +0100 Subject: [PATCH] Add default value for requries and requiresParent to model Porperty --- src/style_manager/model/Property.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/style_manager/model/Property.js b/src/style_manager/model/Property.js index a62fe0677..b1903bf41 100644 --- a/src/style_manager/model/Property.js +++ b/src/style_manager/model/Property.js @@ -26,7 +26,19 @@ const Property = require('backbone').Model.extend( // Use case: // you can add all SVG CSS properties with toRequire as true // and then require them on SVG Components - toRequire: 0 + toRequire: 0, + + // Specifies dependency on other properties of the selected object. + // Property is shown only when all conditions are matched. + // + // example: { display: ['flex', 'block'], position: ['absolute'] }; + // in this case the property is only shown when display is + // of value 'flex' or 'block' AND position is 'absolute' + requires: null, + + // Specifies dependency on properties of the parent of the selected object. + // Property is shown only when all conditions are matched. + requiresParent: null }, initialize(props = {}, opts = {}) {