|
|
@ -167,17 +167,21 @@ export default () => { |
|
|
return compView && compView._getFrame(); |
|
|
return compView && compView._getFrame(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_getLocalEl(globalEl, compView, method) { |
|
|
|
|
|
let result = globalEl; |
|
|
|
|
|
const frameView = this._getCompFrame(compView); |
|
|
|
|
|
result = frameView ? frameView[method]() : result; |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Returns element containing all canvas tools |
|
|
* Returns element containing all canvas tools |
|
|
* @return {HTMLElement} |
|
|
* @return {HTMLElement} |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
getToolsEl(compView) { |
|
|
getToolsEl(compView) { |
|
|
let result = CanvasView.toolsEl; |
|
|
return this._getLocalEl(CanvasView.toolsEl, compView, 'getToolsEl'); |
|
|
const frameView = this._getCompFrame(compView); |
|
|
|
|
|
result = frameView ? frameView.getToolsEl() : result; |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -186,11 +190,7 @@ export default () => { |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
getHighlighter(compView) { |
|
|
getHighlighter(compView) { |
|
|
let result = CanvasView.hlEl; |
|
|
return this._getLocalEl(CanvasView.hlEl, compView, 'getHighlighter'); |
|
|
const frameView = this._getCompFrame(compView); |
|
|
|
|
|
result = frameView ? frameView.getHighlighter() : result; |
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
@ -243,8 +243,12 @@ export default () => { |
|
|
* @return {HTMLElement} |
|
|
* @return {HTMLElement} |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
getOffsetViewerEl() { |
|
|
getOffsetViewerEl(compView) { |
|
|
return CanvasView.offsetEl; |
|
|
return this._getLocalEl( |
|
|
|
|
|
CanvasView.offsetEl, |
|
|
|
|
|
compView, |
|
|
|
|
|
'getOffsetViewerEl' |
|
|
|
|
|
); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|