diff --git a/.gitignore b/.gitignore index 938fbfc..d388697 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ src/**/*.d.ts *.js.map e2e/**/*.js e2e/**/*.js.map -.DS_STORE -**/.DS_STORE +.DS_Store +**/.DS_Store *.iml .idea/ diff --git a/src/lib/src/editor/editor.component.ts b/src/lib/src/editor/editor.component.ts index fc6d185..cb4b3fa 100644 --- a/src/lib/src/editor/editor.component.ts +++ b/src/lib/src/editor/editor.component.ts @@ -367,12 +367,7 @@ export class EditorComponent implements OnInit, OnDestroy, OnChanges { if (newSelection && (!newSelection.model.attr('metadata') || newSelection.model.attr('metadata/metadata/unselectable'))) { newSelection = undefined; } - if (newSelection === this._selection || (!newSelection && !this._selection)) { - if (this._selection /*&& propsMgr*/) { - // propsMgr.togglePropertiesView(selection); - } - } - else { + if (newSelection !== this._selection) { if (this._selection) { var elementview = this.paper.findViewByModel(this._selection.model); if (elementview) { // May have been removed from the graph @@ -387,10 +382,6 @@ export class EditorComponent implements OnInit, OnDestroy, OnChanges { } } this._selection = newSelection; - $('#properties', this.element.nativeElement).css('display','block'); - // if (propsMgr) { - // propsMgr.updatePropertiesView(newSelection); - // } } } @@ -909,11 +900,6 @@ export class EditorComponent implements OnInit, OnDestroy, OnChanges { propAttr.indexOf('props') === 0 || (this.renderer && this.renderer.isSemanticProperty && this.renderer.isSemanticProperty(propAttr, node))) { this.postValidation(); - if (this.selection && this.selection.model === node) { - // if (propsMgr) { - // propsMgr.updatePropertiesView(selection); - // } - } this.graphToTextEventEmitter.emit(); } if (this.renderer && this.renderer.refreshVisuals) { @@ -933,12 +919,7 @@ export class EditorComponent implements OnInit, OnDestroy, OnChanges { */ handleLinkEvent(event : string, link : dia.Link) { if (this.renderer && this.renderer.handleLinkEvent) { - if (this.renderer.handleLinkEvent(this.paper, event, link)) { - // If the link was changed, update the properties view which might be open for it - // if (propsMgr && propsMgr.isVisible(link.id)) { - // propsMgr.updatePropertiesView(paper.findViewByModel(link)); - // } - } + this.renderer.handleLinkEvent(this.editorContext, event, link); } } @@ -982,11 +963,6 @@ export class EditorComponent implements OnInit, OnDestroy, OnChanges { if (sourceId || targetId) { this.postValidation(); } - // if (this.selection && this.selection.model === link) { - // if (propsMgr) { - // propsMgr.updatePropertiesView(selection); - // } - // } this.graphToTextEventEmitter.emit(); } if (this.renderer && this.renderer.refreshVisuals) { @@ -1022,9 +998,6 @@ export class EditorComponent implements OnInit, OnDestroy, OnChanges { } if (this.selection && this.selection.model === element) { this.selection = undefined; - // if (propsMgr) { - // propsMgr.updatePropertiesView(); - // } } if (element.isLink()) { window.setTimeout(() => this.graphToTextEventEmitter.emit(), 100); diff --git a/src/lib/src/shared/flo.common.ts b/src/lib/src/shared/flo.common.ts index 3629cee..6da4f5f 100644 --- a/src/lib/src/shared/flo.common.ts +++ b/src/lib/src/shared/flo.common.ts @@ -118,7 +118,7 @@ export namespace Flo { getNodeView?() : dia.ElementView; getLinkView?() : dia.LinkView; layout?(paper : dia.Paper) : Promise; - handleLinkEvent?(paper : dia.Paper, event : string, link : dia.Link) : void; + handleLinkEvent?(context : EditorContext, event : string, link : dia.Link) : void; isSemanticProperty?(propertyPath : string, element : dia.Cell) : boolean; refreshVisuals?(cell : dia.Cell, propertyPath : string, paper : dia.Paper) : void; getLinkAnchorPoint?(linkView : dia.LinkView, view : dia.ElementView, port : SVGElement, reference : dia.Point) : dia.Point; diff --git a/src/lib/src/shared/flo.css b/src/lib/src/shared/flo.css index 9a31e83..5e5fc2a 100644 --- a/src/lib/src/shared/flo.css +++ b/src/lib/src/shared/flo.css @@ -309,6 +309,7 @@ flo-view { text-align: right; font-weight:bold; color: black; + background-color: transparent; } .zoom-canvas-label {