Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fancy-canvas

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fancy-canvas - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

12

canvas-element-bitmap-size.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc