Conversation
a636edd to
56c676a
Compare
# Conflicts: # src/model/index.ts
|
I get a runtime error when switching to the overview mode:
It seems that the |
| this.fire(ADataProvider.EVENT_SELECTION_CHANGED, [], false); | ||
| } | ||
|
|
||
| clearDetail() { |
| return Array.from(this.selection); | ||
| } | ||
|
|
||
| getDetail() { |
| return this.view(this.getSelection()); | ||
| } | ||
|
|
||
| detailRows(): Promise<any[]> | any[] { |
| this.fire(ADataProvider.EVENT_SELECTION_CHANGED, this.getSelection()); | ||
| } | ||
|
|
||
| removeDetailAll(indices: number[]) { |
| return true; | ||
| } | ||
|
|
||
| toggleDetail(index: number, additional = false) { |
| this.fire(ADataProvider.EVENT_SELECTION_CHANGED, this.getSelection()); | ||
| } | ||
|
|
||
| removeDetail(index: number) { |
| this.selectAll(indices); | ||
| } | ||
|
|
||
| setDetail(indices: number[]) { |
| this.fire(ADataProvider.EVENT_SELECTION_CHANGED, this.getSelection()); | ||
| } | ||
|
|
||
| addDetailAll(indices: number[]) { |
| this.fire(ADataProvider.EVENT_SELECTION_CHANGED, this.getSelection()); | ||
| } | ||
|
|
||
| addDetail(index: number) { |
| return this.selection.has(index); | ||
| } | ||
|
|
||
| isDetail(index: number) { |
| */ | ||
| private readonly selection = new OrderedSet<number>(); | ||
|
|
||
| private readonly detail = new OrderedSet<number>(); |
| @import './threshold'; | ||
| @import './upset'; | ||
| @import './verticalbar'; | ||
| .#{$lu_css_prefix} { |
src/ui/EngineRanking.ts
Outdated
| }; | ||
|
|
||
| constructor(public readonly ranking: Ranking, header: HTMLElement, body: HTMLElement, tableId: string, style: GridStyleManager, private readonly ctx: IEngineRankingContext, roptions: Partial<IEngineRankingOptions> = {}) { | ||
| constructor(public readonly ranking: Ranking, header: HTMLElement, body: HTMLElement, tableId: string, style: GridStyleManager, private readonly ctx: IEngineRankingContext, roptions: Partial<IEngineRankingOptions> = {}, readonly noEvents: boolean = false) { |
There was a problem hiding this comment.
Invert semantic of noEvents = false for easier reading. Because in line 188 the counter part is used if(!noEvents). Rename to addEventListener = true.
src/ui/EngineRanking.ts
Outdated
| if (newValue) { | ||
| // become visible | ||
| const index = ranking.children.indexOf(col); | ||
| if (!noEvents) { |
There was a problem hiding this comment.
Please add a comment why and when no event listner is added? Otherwise nobody understands why this flag exists.
src/ui/EngineRenderer.ts
Outdated
| d3.select(this.node).select('main').style('display', 'none'); | ||
| } | ||
|
|
||
| s2d() { |
There was a problem hiding this comment.
Do not use abbreviations in this case.
src/ui/EngineRenderer.ts
Outdated
| this.textureRenderer.s2d(); | ||
| } | ||
|
|
||
| d2s() { |
There was a problem hiding this comment.
Do not use abbreviations in this case.
src/ui/CanvasTextureRenderer.ts
Outdated
| this.node.style.display = 'none'; | ||
| } | ||
|
|
||
| s2d() { |
There was a problem hiding this comment.
Do not use abbreviations in this case.
src/ui/CanvasTextureRenderer.ts
Outdated
| this.engineRenderer.ctx.provider.setDetail(this.engineRenderer.ctx.provider.getSelection()); | ||
| } | ||
|
|
||
| d2s() { |
There was a problem hiding this comment.
Do not use abbreviations in this case.
src/ui/CanvasTextureRenderer.ts
Outdated
|
|
||
| for (let i = fromIndex; i <= toIndex; i++) { | ||
| if (this.engineRenderer.ctx.provider.isSelected(this.currentLocalData[0][i].i)) { | ||
| ctx.fillStyle = '#ffa809'; |
src/ui/CanvasTextureRenderer.ts
Outdated
| if (this.engineRenderer.ctx.provider.isSelected(this.currentLocalData[0][i].i)) { | ||
| ctx.fillStyle = '#ffa809'; | ||
| } else { | ||
| ctx.fillStyle = '#ffffff'; |
src/ui/taggle/TaggleRenderer.ts
Outdated
| this.renderer.enableHighlightListening(enable); | ||
| } | ||
|
|
||
| d2s() { |
There was a problem hiding this comment.
Do not use abbreviations in this case.
src/ui/taggle/TaggleRenderer.ts
Outdated
| this.renderer.d2s(); | ||
| } | ||
|
|
||
| s2d() { |
There was a problem hiding this comment.
Do not use abbreviations in this case.
src/ui/toolbar.ts
Outdated
| const others = order.filter((d) => !ss.has(d)); | ||
| ctx.provider.setSelection(others); | ||
| }), | ||
| selectionToOverviewDetail: ui('S2D', (_col, _evt, ctx, level) => { |
src/ui/toolbar.ts
Outdated
| const s = ctx.provider.getSelection(); | ||
| ctx.provider.setDetail(s); | ||
| }), | ||
| overviewDetailToSelection: ui('D2S', (_col, _evt, ctx, level) => { |
src/model/OverviewDetailColumn.ts
Outdated
|
|
||
| group(row: IDataRow) { | ||
| const isSelected = this.getValue(row); | ||
| return isSelected ? OverviewDetailColumn.DETAILED_GROUP : OverviewDetailColumn.NOT_DETAILED_GROUP; } |
src/ui/CanvasTextureRenderer.ts
Outdated
| private alreadyExpanded: boolean = false; | ||
| private expandLaterRows: any[] = []; | ||
| private readonly options: Readonly<ILineUpOptions>; | ||
| private readonly idPrefix = 'testprefix'; |
src/ui/CanvasTextureRenderer.ts
Outdated
| totalWidth += rankingWidth; | ||
| }); | ||
| if (totalWidth > this.node.clientWidth) { | ||
| this.currentNodeHeight -= 20; |
There was a problem hiding this comment.
Where does this 20 px are coming from? Is there an existing constant that you can use?
thinkh
left a comment
There was a problem hiding this comment.
I couldn't test this functionality with the lineupjs demos, as there is a bug (as described above). Afterwards I can test it again.
Please fix the mentioned comments, before I'll merge the PR.
Related PR: Caleydo/lineup_app#19
Summary
Introduces a new overview renderer.

In order to display big datasets the columns are rendered onto a canvas. With this approach it is possible to give an overview over very large datasets.
The user is also able to define an expand area. This can be done bei holding down the ALT-key and draging a selection area:

The expand selection is displayed in a seperate column:

The user can expand the selected area to see the row details:
