fancy-canvas
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -72,6 +72,3 @@ import { equalSizes, size } from './size.js'; | ||
this.canvasElement.style.height = "".concat(this._canvasElementClientSize.height, "px"); | ||
// we should use this logic only with devicePixelRatio approach | ||
if (this._devicePixelRatioObservable !== null) { | ||
this._invalidateBitmapSize(); | ||
} | ||
this._invalidateBitmapSize(); | ||
}; | ||
@@ -167,2 +164,3 @@ DevicePixelContentBoxBinding.prototype.subscribeBitmapSizeChanged = function (listener) { | ||
DevicePixelContentBoxBinding.prototype._invalidateBitmapSize = function () { | ||
var _a, _b; | ||
if (this._canvasElement === null) { | ||
@@ -176,7 +174,3 @@ // it looks like we are already dead | ||
} | ||
// we should use this logic only with devicePixelRatio approach | ||
if (this._devicePixelRatioObservable === null) { | ||
return; | ||
} | ||
var ratio = this._devicePixelRatioObservable.value; | ||
var ratio = (_b = (_a = this._devicePixelRatioObservable) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : win.devicePixelRatio; | ||
var canvasRects = this._canvasElement.getClientRects(); | ||
@@ -183,0 +177,0 @@ if (canvasRects.length === 0) { |
{ | ||
"name": "fancy-canvas", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": "smakarov@tradingview.com", | ||
@@ -5,0 +5,0 @@ "description": "Functionality on top of HTML canvas element, including support for HiDPI and pixel-perfect rendering", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17744
382