Socket
Socket
Sign inDemoInstall

@polymer/iron-resizable-behavior

Package Overview
Dependencies
1
Maintainers
7
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-pre.19 to 3.0.0-pre.20

wct.conf.json

56

iron-resizable-behavior.js

@@ -15,2 +15,5 @@ /**

// Contains all connected resizables that do not have a parent.
var ORPHANS = new Set();
/**

@@ -67,2 +70,3 @@ * `IronResizableBehavior` is a behavior that can be used in Polymer elements to

} else {
ORPHANS.delete(this);
window.removeEventListener('resize', this._boundNotifyResize);

@@ -97,3 +101,13 @@ }

assignParentResizable: function(parentResizable) {
if (this._parentResizable) {
this._parentResizable.stopResizeNotificationsFor(this);
}
this._parentResizable = parentResizable;
if (parentResizable &&
parentResizable._interestedResizables.indexOf(this) === -1) {
parentResizable._interestedResizables.push(this);
parentResizable.listen(this, 'iron-resize', '_onDescendantIronResize');
}
},

@@ -151,7 +165,2 @@

if (this._interestedResizables.indexOf(target) === -1) {
this._interestedResizables.push(target);
this.listen(target, 'iron-resize', '_onDescendantIronResize');
}
target.assignParentResizable(this);

@@ -202,13 +211,42 @@ this._notifyDescendant(target);

} else {
this.fire(
'iron-request-resize-notifications',
null,
{node: this, bubbles: true, cancelable: true});
this._findParent();
if (!this._parentResizable) {
// If this resizable is an orphan, tell other orphans to try to find
// their parent again, in case it's this resizable.
ORPHANS.forEach(function(orphan) {
if (orphan !== this) {
orphan._findParent();
}
}, this);
window.addEventListener('resize', this._boundNotifyResize);
this.notifyResize();
} else {
// If this resizable has a parent, tell other child resizables of
// that parent to try finding their parent again, in case it's this
// resizable.
this._parentResizable._interestedResizables
.forEach(function(resizable) {
if (resizable !== this) {
resizable._findParent();
}
}, this);
}
}
},
_findParent: function() {
this.assignParentResizable(null);
this.fire(
'iron-request-resize-notifications',
null,
{node: this, bubbles: true, cancelable: true});
if (!this._parentResizable) {
ORPHANS.add(this);
} else {
ORPHANS.delete(this);
}
}
};

8

package.json

@@ -16,7 +16,7 @@ {

"devDependencies": {
"@polymer/gen-typescript-declarations": "^1.2.0",
"@polymer/gen-typescript-declarations": "^1.2.2",
"bower": "^1.8.0",
"webmat": "^0.2.0",
"@polymer/iron-component-page": "^3.0.0-pre.19",
"wct-browser-legacy": "^0.0.1-pre.11",
"@polymer/iron-component-page": "^3.0.0-pre.20",
"wct-browser-legacy": "^1.0.1",
"@webcomponents/webcomponentsjs": "^2.0.0"

@@ -28,3 +28,3 @@ },

},
"version": "3.0.0-pre.19",
"version": "3.0.0-pre.20",
"resolutions": {

@@ -31,0 +31,0 @@ "inherits": "2.0.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc