This repository was archived by the owner on May 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { FontAwesomeNode } from '../../plugin-fontawesome/src/FontAwesomeNode';
22import { DomObject } from '../../plugin-renderer-dom-object/src/DomObjectRenderingEngine' ;
33import { FontAwesomeDomObjectRenderer } from '../../plugin-fontawesome/src/FontAwesomeDomObjectRenderer' ;
44import { RenderingEngineWorker } from '../../plugin-renderer/src/RenderingEngineCache' ;
5+ import { RelativePosition } from '../../core/src/VNodes/VNode' ;
56
67export class OdooFontAwesomeDomObjectRenderer extends FontAwesomeDomObjectRenderer {
78 predicate = FontAwesomeNode ;
@@ -14,11 +15,16 @@ export class OdooFontAwesomeDomObjectRenderer extends FontAwesomeDomObjectRender
1415 if ( domObject && 'children' in domObject ) {
1516 const fa = domObject . children [ 1 ] ;
1617
17- const dbclickCallback = ( ) => {
18- const params = { image : node } ;
19- this . engine . editor . execCommand ( 'openMedia' , params ) ;
20- } ;
2118 if ( 'tag' in fa ) {
19+ const dbclickCallback = ( ) => {
20+ const params = {
21+ image : node ,
22+ origin : 'fontAwesomeDoubleClick' ,
23+ htmlClass : fa . attributes . class ,
24+ } ;
25+ this . engine . editor . execCommand ( 'openMedia' , params ) ;
26+ } ;
27+
2228 const savedAttach = fa . attach ;
2329 fa . attach = ( el : HTMLElement ) : void => {
2430 if ( savedAttach ) {
You can’t perform that action at this time.
0 commit comments