Socket
Socket
Sign inDemoInstall

liquid-tank

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.10 to 0.0.11

35

liquid-tank.js
(function() {
function LiquidTank(element, options) {
this._destroyed = false;
this.element =

@@ -35,15 +36,3 @@ typeof element === "string" ? document.querySelector(element) : element;

LiquidTank.prototype.clear = function() {
this.canvas
.getContext("2d")
.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.element.removeChild(this.canvas);
if (window.hasOwnProperty("ResizeObserver")) {
if (this._resizeObserver) {
this._resizeObserver.unobserve(this.element);
this._resizeObserver.disconnect();
this._resizeObserver;
}
} else {
window.removeEventListener("resize", this.onResize);
}
this.destroy();
};

@@ -59,2 +48,22 @@

LiquidTank.prototype.destroy = function() {
if (!this._destroyed) {
this._destroyed = true;
this.canvas
.getContext("2d")
.clearRect(0, 0, this.canvas.width, this.canvas.height);
if (window.hasOwnProperty("ResizeObserver")) {
if (this._resizeObserver) {
this._resizeObserver.unobserve(this.element);
this._resizeObserver.disconnect();
this._resizeObserver = null;
}
} else {
window.removeEventListener("resize", this.onResize);
}
this.element.removeChild(this.canvas);
this.canvas = null;
}
};
LiquidTank.prototype.render = function() {

@@ -61,0 +70,0 @@ this.canvas.height = _getActualHeight(this.element);

{
"name": "liquid-tank",
"version": "0.0.10",
"version": "0.0.11",
"description": "",

@@ -5,0 +5,0 @@ "main": "liquid-tank.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc