Bands allways inside viewport
This commit is contained in:
1 parent
02f519adf6
commit
33f3f09e27
1 file changed
+20
@@ -522,6 +522,26 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
let diffA = bandPoint2.y - canvas.chartSpace.viewport.visibleArea.bottomLeft.y
|
||||
if (diffA > 0) {
|
||||
bandPoint1.y = bandPoint1.y - diffA
|
||||
bandPoint2.y = bandPoint2.y - diffA
|
||||
bandPoint3.y = bandPoint3.y - diffA
|
||||
bandPoint4.y = bandPoint4.y - diffA
|
||||
bandPoint5.y = bandPoint5.y - diffA
|
||||
bandPoint6.y = bandPoint6.y - diffA
|
||||
}
|
||||
|
||||
let diffB = bandPoint1.y - canvas.chartSpace.viewport.visibleArea.topLeft.y
|
||||
if (diffB < 0) {
|
||||
bandPoint1.y = bandPoint1.y - diffB
|
||||
bandPoint2.y = bandPoint2.y - diffB
|
||||
bandPoint3.y = bandPoint3.y - diffB
|
||||
bandPoint4.y = bandPoint4.y - diffB
|
||||
bandPoint5.y = bandPoint5.y - diffB
|
||||
bandPoint6.y = bandPoint6.y - diffB
|
||||
}
|
||||
|
||||
bandPoint1 = canvas.chartSpace.viewport.fitIntoVisibleArea(bandPoint1);
|
||||
bandPoint2 = canvas.chartSpace.viewport.fitIntoVisibleArea(bandPoint2);
|
||||
bandPoint3 = canvas.chartSpace.viewport.fitIntoVisibleArea(bandPoint3);
|
||||
|
||||
Reference in new issue
Block a user