diff --git a/src/canvas/index.js b/src/canvas/index.js index 47a47eead..7cd64d7e8 100644 --- a/src/canvas/index.js +++ b/src/canvas/index.js @@ -54,6 +54,14 @@ module.exports = () => { return this; }, + /** + * Return config object + * @return {Object} + */ + getConfig() { + return c; + }, + /** * Add 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 * @param {HTMLElement} el