A hash of CSS properties that will be set as inline style on the view's el (color: red;, etc.), or a function that returns such a hash.
constructor()
There are several special options that, if passed, will be attached directly to the view: model, collection, el, id, className, tagName, attributes, style and events. If the view defines an initialize function, it will be called when the view is first created. If you'd like to create a view that references an element already in the DOM, pass in the element as an option: new View({el: existingElement})
var doc = documents.first();
new DocumentRow({
model: doc,
id: "document-row-" + doc.id
});
events
The events hash (or method) can be used to specify a set of DOM events that will be bound to methods on your View through delegateEvents.
JointJS will automatically attach the event listeners at instantiation time, right before invoking initialize.
Description
Allow
style
attribute to be set via options.All other properties can be set either as a class property or as a constructor option.
Documentation
The documentation missing not only the
style
property but alsoevents
andconstructor()
. https://docs.jointjs.com/api/mvc/View/#propertiesstyle
A hash of CSS properties that will be set as inline style on the view's el (
color: red;
, etc.), or a function that returns such a hash.constructor()
There are several special options that, if passed, will be attached directly to the view:
model
,collection
,el
,id
,className
,tagName
,attributes
,style
andevents
. If the view defines an initialize function, it will be called when the view is first created. If you'd like to create a view that references an element already in the DOM, pass in the element as an option:new View({el: existingElement})
events
The events hash (or method) can be used to specify a set of DOM events that will be bound to methods on your View through
delegateEvents
.JointJS will automatically attach the event listeners at instantiation time, right before invoking
initialize
.