@amcharts/amcharts5 5.3.6 → 5.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.internal/charts/stock/StockChart.d.ts +14 -1
- package/.internal/charts/stock/StockChart.d.ts.map +1 -1
- package/.internal/charts/stock/StockChart.js +44 -0
- package/.internal/charts/stock/StockChart.js.map +1 -1
- package/.internal/charts/stock/StockChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/stock/StockChartDefaultTheme.js +3 -1
- package/.internal/charts/stock/StockChartDefaultTheme.js.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts +1 -0
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.js +15 -0
- package/.internal/charts/stock/drawing/DrawingSeries.js.map +1 -1
- package/.internal/charts/stock/toolbar/DateRangeSelector.d.ts +21 -0
- package/.internal/charts/stock/toolbar/DateRangeSelector.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/DateRangeSelector.js +49 -6
- package/.internal/charts/stock/toolbar/DateRangeSelector.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.js +1 -0
- package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.js +1 -0
- package/.internal/charts/xy/axes/AxisRendererY.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +20 -1
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/Root.d.ts +13 -0
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +44 -14
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Component.d.ts.map +1 -1
- package/.internal/core/render/Component.js +1 -0
- package/.internal/core/render/Component.js.map +1 -1
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +8 -2
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts +7 -7
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +55 -47
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/render/backend/Renderer.d.ts +1 -1
- package/.internal/core/render/backend/Renderer.d.ts.map +1 -1
- package/.internal/core/render/backend/Renderer.js.map +1 -1
- package/.internal/plugins/exporting/Exporting.d.ts.map +1 -1
- package/.internal/plugins/exporting/Exporting.js +4 -4
- package/.internal/plugins/exporting/Exporting.js.map +1 -1
- package/CHANGELOG.md +17 -0
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/map.d.ts +1 -1
- package/map.d.ts.map +1 -1
- package/map.js +1 -1
- package/map.js.map +1 -1
- package/package.json +1 -1
|
@@ -447,6 +447,7 @@ export class CanvasDisplayObject extends DisposerClass {
|
|
|
447
447
|
if (this._parent) {
|
|
448
448
|
this._parent.registerChildLayer(this._layer);
|
|
449
449
|
}
|
|
450
|
+
this._layer.dirty = true;
|
|
450
451
|
this._renderer.resizeLayer(this._layer);
|
|
451
452
|
this._renderer.resizeGhost();
|
|
452
453
|
}
|
|
@@ -3331,25 +3332,25 @@ export class CanvasRenderer extends ArrayDisposer {
|
|
|
3331
3332
|
writable: true,
|
|
3332
3333
|
value: this._patternCanvas.getContext("2d")
|
|
3333
3334
|
});
|
|
3334
|
-
Object.defineProperty(this, "
|
|
3335
|
+
Object.defineProperty(this, "_domWidth", {
|
|
3335
3336
|
enumerable: true,
|
|
3336
3337
|
configurable: true,
|
|
3337
3338
|
writable: true,
|
|
3338
3339
|
value: 0
|
|
3339
3340
|
});
|
|
3340
|
-
Object.defineProperty(this, "
|
|
3341
|
+
Object.defineProperty(this, "_domHeight", {
|
|
3341
3342
|
enumerable: true,
|
|
3342
3343
|
configurable: true,
|
|
3343
3344
|
writable: true,
|
|
3344
3345
|
value: 0
|
|
3345
3346
|
});
|
|
3346
|
-
Object.defineProperty(this, "
|
|
3347
|
+
Object.defineProperty(this, "_canvasWidth", {
|
|
3347
3348
|
enumerable: true,
|
|
3348
3349
|
configurable: true,
|
|
3349
3350
|
writable: true,
|
|
3350
3351
|
value: 0
|
|
3351
3352
|
});
|
|
3352
|
-
Object.defineProperty(this, "
|
|
3353
|
+
Object.defineProperty(this, "_canvasHeight", {
|
|
3353
3354
|
enumerable: true,
|
|
3354
3355
|
configurable: true,
|
|
3355
3356
|
writable: true,
|
|
@@ -3620,25 +3621,25 @@ export class CanvasRenderer extends ArrayDisposer {
|
|
|
3620
3621
|
return new CanvasImage(this, image);
|
|
3621
3622
|
}
|
|
3622
3623
|
resizeLayer(layer) {
|
|
3623
|
-
layer.
|
|
3624
|
-
layer.resize(this._clientWidth, this._clientHeight, this.resolution);
|
|
3624
|
+
layer.resize(this._canvasWidth, this._canvasHeight, this._domWidth, this._domHeight, this.resolution);
|
|
3625
3625
|
}
|
|
3626
3626
|
resizeGhost() {
|
|
3627
|
-
this._ghostLayer.resize(this.
|
|
3627
|
+
this._ghostLayer.resize(this._canvasWidth, this._canvasHeight, this._domWidth, this._domHeight, this.resolution);
|
|
3628
3628
|
}
|
|
3629
|
-
resize(
|
|
3630
|
-
this.
|
|
3631
|
-
this.
|
|
3632
|
-
this.
|
|
3633
|
-
this.
|
|
3629
|
+
resize(canvasWidth, canvasHeight, domWidth, domHeight) {
|
|
3630
|
+
this._canvasWidth = canvasWidth;
|
|
3631
|
+
this._canvasHeight = canvasHeight;
|
|
3632
|
+
this._domWidth = domWidth;
|
|
3633
|
+
this._domHeight = domHeight;
|
|
3634
3634
|
$array.each(this.layers, (layer) => {
|
|
3635
3635
|
if (layer) {
|
|
3636
|
+
layer.dirty = true;
|
|
3636
3637
|
this.resizeLayer(layer);
|
|
3637
3638
|
}
|
|
3638
3639
|
});
|
|
3639
3640
|
this.resizeGhost();
|
|
3640
|
-
this.view.style.width =
|
|
3641
|
-
this.view.style.height =
|
|
3641
|
+
this.view.style.width = domWidth + "px";
|
|
3642
|
+
this.view.style.height = domHeight + "px";
|
|
3642
3643
|
}
|
|
3643
3644
|
createDetachedLayer(willReadFrequently = false) {
|
|
3644
3645
|
const view = document.createElement("canvas");
|
|
@@ -3667,11 +3668,8 @@ export class CanvasRenderer extends ArrayDisposer {
|
|
|
3667
3668
|
const layer = this.createDetachedLayer(order == 99);
|
|
3668
3669
|
layer.order = order;
|
|
3669
3670
|
layer.visible = visible;
|
|
3670
|
-
if (layer.visible
|
|
3671
|
-
|
|
3672
|
-
layer.view.style.width = this._clientWidth + "px";
|
|
3673
|
-
layer.view.height = this._height;
|
|
3674
|
-
layer.view.style.height = this._clientHeight + "px";
|
|
3671
|
+
if (layer.visible) {
|
|
3672
|
+
this.resizeLayer(layer);
|
|
3675
3673
|
}
|
|
3676
3674
|
const layers = this.layers;
|
|
3677
3675
|
layers.push(layer);
|
|
@@ -4160,27 +4158,29 @@ export class CanvasRenderer extends ArrayDisposer {
|
|
|
4160
4158
|
options = {};
|
|
4161
4159
|
}
|
|
4162
4160
|
let scale = this.resolution;
|
|
4161
|
+
let canvasWidth = Math.floor(this._canvasWidth * this.resolution);
|
|
4162
|
+
let canvasHeight = Math.floor(this._canvasHeight * this.resolution);
|
|
4163
4163
|
// Check if we need to scale
|
|
4164
|
-
if (options.minWidth && (options.minWidth >
|
|
4165
|
-
let minScale = options.minWidth /
|
|
4164
|
+
if (options.minWidth && (options.minWidth > canvasWidth)) {
|
|
4165
|
+
let minScale = options.minWidth / canvasWidth;
|
|
4166
4166
|
if (minScale > scale) {
|
|
4167
4167
|
scale = minScale * this.resolution;
|
|
4168
4168
|
}
|
|
4169
4169
|
}
|
|
4170
|
-
if (options.minHeight && (options.minHeight >
|
|
4171
|
-
let minScale = options.minHeight /
|
|
4170
|
+
if (options.minHeight && (options.minHeight > canvasHeight)) {
|
|
4171
|
+
let minScale = options.minHeight / canvasHeight;
|
|
4172
4172
|
if (minScale > scale) {
|
|
4173
4173
|
scale = minScale * this.resolution;
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
|
-
if (options.maxWidth && (options.maxWidth <
|
|
4177
|
-
let maxScale = options.maxWidth /
|
|
4176
|
+
if (options.maxWidth && (options.maxWidth < canvasWidth)) {
|
|
4177
|
+
let maxScale = options.maxWidth / canvasWidth;
|
|
4178
4178
|
if (maxScale < scale) {
|
|
4179
4179
|
scale = maxScale * this.resolution;
|
|
4180
4180
|
}
|
|
4181
4181
|
}
|
|
4182
|
-
if (options.maxHeight && (options.maxHeight >
|
|
4183
|
-
let maxScale = options.maxHeight /
|
|
4182
|
+
if (options.maxHeight && (options.maxHeight > canvasHeight)) {
|
|
4183
|
+
let maxScale = options.maxHeight / canvasHeight;
|
|
4184
4184
|
if (maxScale < scale) {
|
|
4185
4185
|
scale = maxScale * this.resolution;
|
|
4186
4186
|
}
|
|
@@ -4193,13 +4193,11 @@ export class CanvasRenderer extends ArrayDisposer {
|
|
|
4193
4193
|
const canvases = [];
|
|
4194
4194
|
// Set up new canvas for export
|
|
4195
4195
|
let forceRender = false;
|
|
4196
|
-
let canvasWidth = this._width;
|
|
4197
|
-
let canvasHeight = this._height;
|
|
4198
4196
|
const canvas = document.createElement("canvas");
|
|
4199
4197
|
if (scale != this.resolution) {
|
|
4200
4198
|
forceRender = true;
|
|
4201
|
-
canvasWidth =
|
|
4202
|
-
canvasHeight =
|
|
4199
|
+
canvasWidth = canvasWidth * scale / this.resolution;
|
|
4200
|
+
canvasHeight = canvasHeight * scale / this.resolution;
|
|
4203
4201
|
}
|
|
4204
4202
|
canvas.width = canvasWidth;
|
|
4205
4203
|
canvas.height = canvasHeight;
|
|
@@ -4314,17 +4312,20 @@ class GhostLayer {
|
|
|
4314
4312
|
this.view.style.top = "0px";
|
|
4315
4313
|
this.view.style.left = "0px";
|
|
4316
4314
|
}
|
|
4317
|
-
resize(
|
|
4318
|
-
|
|
4319
|
-
|
|
4315
|
+
resize(canvasWidth, canvasHeight, domWidth, domHeight, resolution) {
|
|
4316
|
+
canvasWidth += (this.margin.left + this.margin.right);
|
|
4317
|
+
canvasHeight += (this.margin.top + this.margin.bottom);
|
|
4318
|
+
// TODO this should take into account calculateSize
|
|
4319
|
+
domWidth += (this.margin.left + this.margin.right);
|
|
4320
|
+
domHeight += (this.margin.top + this.margin.bottom);
|
|
4320
4321
|
this.view.style.left = -this.margin.left + "px";
|
|
4321
4322
|
this.view.style.top = -this.margin.top + "px";
|
|
4322
|
-
this._width = Math.floor(
|
|
4323
|
-
this._height = Math.floor(
|
|
4323
|
+
this._width = Math.floor(canvasWidth * resolution);
|
|
4324
|
+
this._height = Math.floor(canvasHeight * resolution);
|
|
4324
4325
|
this.view.width = this._width;
|
|
4325
|
-
this.view.style.width =
|
|
4326
|
+
this.view.style.width = domWidth + "px";
|
|
4326
4327
|
this.view.height = this._height;
|
|
4327
|
-
this.view.style.height =
|
|
4328
|
+
this.view.style.height = domHeight + "px";
|
|
4328
4329
|
}
|
|
4329
4330
|
getImageData(point, bbox) {
|
|
4330
4331
|
return this.context.getImageData(
|
|
@@ -4443,16 +4444,23 @@ export class CanvasLayer {
|
|
|
4443
4444
|
this.view = view;
|
|
4444
4445
|
this.context = context;
|
|
4445
4446
|
}
|
|
4446
|
-
resize(
|
|
4447
|
+
resize(canvasWidth, canvasHeight, domWidth, domHeight, resolution) {
|
|
4448
|
+
// TODO should this take into account calculateSize ?
|
|
4447
4449
|
if (this.width != null) {
|
|
4448
|
-
|
|
4450
|
+
canvasWidth = this.width;
|
|
4451
|
+
domWidth = this.width;
|
|
4449
4452
|
}
|
|
4453
|
+
// TODO should this take into account calculateSize ?
|
|
4450
4454
|
if (this.height != null) {
|
|
4451
|
-
|
|
4455
|
+
canvasHeight = this.height;
|
|
4456
|
+
domHeight = this.height;
|
|
4452
4457
|
}
|
|
4453
4458
|
if (this.margin) {
|
|
4454
|
-
|
|
4455
|
-
|
|
4459
|
+
canvasWidth += (this.margin.left + this.margin.right);
|
|
4460
|
+
canvasHeight += (this.margin.top + this.margin.bottom);
|
|
4461
|
+
// TODO this should take into account calculateSize
|
|
4462
|
+
domWidth += (this.margin.left + this.margin.right);
|
|
4463
|
+
domHeight += (this.margin.top + this.margin.bottom);
|
|
4456
4464
|
this.view.style.left = -this.margin.left + "px";
|
|
4457
4465
|
this.view.style.top = -this.margin.top + "px";
|
|
4458
4466
|
}
|
|
@@ -4460,12 +4468,12 @@ export class CanvasLayer {
|
|
|
4460
4468
|
this.view.style.left = "0px";
|
|
4461
4469
|
this.view.style.top = "0px";
|
|
4462
4470
|
}
|
|
4463
|
-
this._width = Math.floor(
|
|
4464
|
-
this._height = Math.floor(
|
|
4471
|
+
this._width = Math.floor(canvasWidth * resolution);
|
|
4472
|
+
this._height = Math.floor(canvasHeight * resolution);
|
|
4465
4473
|
this.view.width = this._width;
|
|
4466
|
-
this.view.style.width =
|
|
4474
|
+
this.view.style.width = domWidth + "px";
|
|
4467
4475
|
this.view.height = this._height;
|
|
4468
|
-
this.view.style.height =
|
|
4476
|
+
this.view.style.height = domHeight + "px";
|
|
4469
4477
|
}
|
|
4470
4478
|
clear() {
|
|
4471
4479
|
this.context.save();
|