|
|
@ -54,6 +54,14 @@ module.exports = () => { |
|
|
return this; |
|
|
return this; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Return config object |
|
|
|
|
|
* @return {Object} |
|
|
|
|
|
*/ |
|
|
|
|
|
getConfig() { |
|
|
|
|
|
return c; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Add wrapper |
|
|
* Add wrapper |
|
|
* @param {Object} wrp Wrapper |
|
|
* @param {Object} wrp Wrapper |
|
|
@ -203,6 +211,18 @@ module.exports = () => { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Set custom badge naming strategy |
|
|
|
|
|
* @param {Function} f |
|
|
|
|
|
* @example |
|
|
|
|
|
* canvas.setCustomBadgeLabel(function(model){ |
|
|
|
|
|
* return ComponentModel.getName(); |
|
|
|
|
|
* }); |
|
|
|
|
|
*/ |
|
|
|
|
|
setCustomBadgeLabel(f) { |
|
|
|
|
|
c.customBadgeLabel = f; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Get element position relative to the canvas |
|
|
* Get element position relative to the canvas |
|
|
* @param {HTMLElement} el |
|
|
* @param {HTMLElement} el |
|
|
|