Browse Source

Add `setDragMode` method to the component

pull/2190/head
Artur Arseniev 7 years ago
parent
commit
283321178c
  1. 10
      src/dom_components/model/Component.js

10
src/dom_components/model/Component.js

@ -229,6 +229,16 @@ const Component = Backbone.Model.extend(Styleable).extend(
return collection && collection.indexOf(this);
},
/**
* Change the drag mode of the component.
* To get more about this feature read: https://github.com/artf/grapesjs/issues/1936
* @param {String} value Drag mode, options: 'absolute' | 'translate'
* @returns {this}
*/
setDragMode(value) {
return this.set('dmode', value);
},
/**
* Find inner components by query string.
* **ATTENTION**: this method works only with already rendered component

Loading…
Cancel
Save