Skip to content

Commit 6023211

Browse files
committed
dist folder
1 parent c0468a1 commit 6023211

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

dist/components/d3_line_rect/multi_focus.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class MultiFocus {
8686
this.drawLine = this.drawLine.bind(this);
8787
this.drawOtherLines = this.drawOtherLines.bind(this);
8888
this.drawGrid = this.drawGrid.bind(this);
89+
this.drawPageMarker = this.drawPageMarker.bind(this);
8990
this.onClickTarget = this.onClickTarget.bind(this);
9091
this.isFirefox = typeof InstallTrigger !== 'undefined';
9192
}
@@ -331,6 +332,18 @@ class MultiFocus {
331332
this.grid.y.call(this.axisCall.y.tickSize(-this.w, 0, 0)).selectAll('line').attr('stroke', '#ddd').attr('stroke-opacity', 0.6).attr('fill', 'none');
332333
}
333334
}
335+
drawPageMarker(hplcMsSt) {
336+
if (!this.root) return;
337+
const currentPageValue = hplcMsSt?.tic?.currentPageValue;
338+
const hasValue = Number.isFinite(currentPageValue);
339+
const marker = this.root.selectAll('.tic-page-marker').data(hasValue ? [currentPageValue] : []);
340+
marker.exit().remove();
341+
if (!hasValue) return;
342+
const {
343+
xt
344+
} = (0, _compass.TfRescale)(this);
345+
marker.enter().append('line').attr('class', 'tic-page-marker').attr('stroke', 'red').attr('stroke-width', 1).attr('stroke-opacity', 0.8).merge(marker).attr('x1', xt(currentPageValue)).attr('x2', xt(currentPageValue)).attr('y1', 0).attr('y2', this.h);
346+
}
334347
onClickTarget(event, data) {
335348
event.stopPropagation();
336349
event.preventDefault();
@@ -373,6 +386,7 @@ class MultiFocus {
373386
this.setConfig(sweepExtentSt);
374387
this.drawLine();
375388
this.drawGrid();
389+
this.drawPageMarker(hplcMsSt);
376390
this.drawOtherLines(layoutSt);
377391
this.drawTicLegend(ticEntities, hplcMsSt);
378392
}
@@ -408,6 +422,7 @@ class MultiFocus {
408422
this.getShouldUpdate();
409423
this.drawLine();
410424
this.drawGrid();
425+
this.drawPageMarker(hplcMsSt);
411426
this.drawOtherLines(layoutSt);
412427
this.drawTicLegend(ticEntities, hplcMsSt);
413428
}

0 commit comments

Comments
 (0)