Revize 1aff7bb0
Přidáno uživatelem Martin Matas před téměř 6 roky(ů)
sources/imiger-core/src/main/webapp/js/components/node.js | ||
---|---|---|
421 | 421 |
app.sidebarComponent.excludedNodeListComponent.addNode(this); |
422 | 422 |
} else if (document.modeForm.mode.value === 'move') { |
423 | 423 |
this.highlightWithNeighbours(!this.isHighlighted); |
424 |
var notifyTimeline = new CustomEvent('imigerClick', { detail: { entityID: this.id, archetype: "item" } }); |
|
425 |
window.frames[0].document.dispatchEvent(notifyTimeline); |
|
424 |
|
|
425 |
if (e.detail !== this.id) { |
|
426 |
var archetypeString = app.archetype.vertex[this.archetype].name; |
|
427 |
if (archetypeString !== 'person') archetypeString = 'item'; |
|
428 |
var notifyTimeline = new CustomEvent('imigerClick', { detail: { entityID: this.id, archetype: archetypeString } }); |
|
429 |
window.frames[0].document.dispatchEvent(notifyTimeline); |
|
430 |
} |
|
426 | 431 |
|
427 | 432 |
if (this.isHighlighted) { |
428 | 433 |
app.activeNode = this; |
sources/imiger-core/src/main/webapp/js/showGraphApp.js | ||
---|---|---|
132 | 132 |
|
133 | 133 |
this.sidebarComponent.minimapComponent.viewportSize = this.viewportComponent.size; |
134 | 134 |
|
135 |
// timeline |
|
136 |
document.addEventListener('timelineClick', function (e) { |
|
137 |
var node = app.nodeList[e.detail]; |
|
138 |
if (node !== undefined) { |
|
139 |
node._onNodeClick(e); |
|
140 |
} |
|
141 |
}, false); |
|
142 |
|
|
135 | 143 |
// diagram |
136 | 144 |
document.addEventListener(DiagramUpdatedEvent.name, e => { |
137 | 145 |
this.diagram = new Diagram(e.detail); |
sources/imiger-core/src/main/webapp/timeline/js/cz/kajda/timeline/Timeline.js | ||
---|---|---|
500 | 500 |
}, |
501 | 501 |
|
502 | 502 |
_handleIMiGErClick : function(e) { |
503 |
var entity = this.getEntities().get(e.originalEvent.detail.entityID);
|
|
503 |
var entity = this.getEntities().get(e.originalEvent.detail.entityID),
|
|
504 | 504 |
bandItem = this._bandGroup.getBand(e.originalEvent.detail.archetype).getBandItem(entity.getId()); |
505 | 505 |
|
506 | 506 |
this.focusItem(bandItem.getEntity(), false); |
... | ... | |
611 | 611 |
*/ |
612 | 612 |
_handleItemClick : function(e) { |
613 | 613 |
var bandItemElm = $(e.currentTarget); |
614 |
var entity = this.getEntities().get(bandItemElm.data("entity"));
|
|
614 |
var entity = this.getEntities().get(bandItemElm.data("entity")),
|
|
615 | 615 |
bandItem = this._bandGroup.getBand($(e.currentTarget).data("band")).getBandItem(entity.getId()); |
616 |
|
|
617 |
// imiger trigger |
|
618 |
var ev = new CustomEvent('timelineClick', { detail: entity.getId() }); |
|
619 |
window.parent.document.dispatchEvent(ev); |
|
616 | 620 |
|
617 | 621 |
this.focusItem(bandItem.getEntity(), false); |
618 | 622 |
this._fireEvent("itemClick", entity); |
Také k dispozici: Unified diff
Timeline to IMiGEr interaction (refs #7464)
- imlemented imiger selection based on selected value in Timeline
- this feature also support deselection due to doubleClick event of IMiGEr