Comparing version 0.8.6 to 0.8.7
{ | ||
"name": "material", | ||
"version": "0.8.6", | ||
"version": "0.8.7", | ||
"description": "A lightweight implementation of Material Design Components for the web - ES6", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,3 +8,2 @@ export default { | ||
const name = this.constructor.name | ||
console.log('constructor', name) | ||
@@ -17,11 +16,4 @@ if (!target) return | ||
console.log('caller', caller) | ||
console.log('screen', screen) | ||
console.log('element', element) | ||
let left, top | ||
console.log('align', align) | ||
console.log('target left', caller.left) | ||
switch (align) { | ||
@@ -45,9 +37,11 @@ case 'left': | ||
// ensure that the element remains within the limits of its container | ||
if (left < 0) left = offsetX | ||
if (left + element.width + offsetX > screen.width) { | ||
left = caller.left - element.width + caller.width - offsetX | ||
left = screen.width - element.width - offsetX | ||
} | ||
console.log('left', left) | ||
// console.log('left', left) | ||
@@ -83,8 +77,2 @@ // left = Math.max(offsetX, Math.min(left, screen.width - element.width - offsetX)) | ||
// if (this.options.class !== 'menu') { | ||
// top = Math.max(offsetY, Math.min(top, screen.height - element.height - offsetY)) | ||
// } | ||
console.log('top', top) | ||
this.element.style.left = `${left}px` | ||
@@ -91,0 +79,0 @@ this.element.style.top = `${top}px` |
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
469389
11073