* Class for file drop

* OCD

* We don't need the invalid state, as we'll accept all types.

* Flattening CSS

* Fixing zoom input in Firefox

* Fixing 'container' scaleTo

* two-up closer design match & smaller line

* Fixing edge bug
This commit is contained in:
Jake Archibald
2018-11-06 13:31:58 +00:00
committed by GitHub
parent 43def798e1
commit 0cec90c7ca
11 changed files with 182 additions and 172 deletions

View File

@@ -145,7 +145,7 @@ export default class PinchZoom extends HTMLElement {
const relativeToEl = (relativeTo === 'content' ? this._positioningEl : this);
// No content element? Fall back to just setting scale
if (!relativeToEl) {
if (!relativeToEl || !this._positioningEl) {
this.setTransform({ scale, allowChangeEvent });
return;
}
@@ -157,6 +157,10 @@ export default class PinchZoom extends HTMLElement {
if (relativeTo === 'content') {
originX += this.x;
originY += this.y;
} else {
const currentRect = this._positioningEl.getBoundingClientRect();
originX -= currentRect.left;
originY -= currentRect.top;
}
this._applyChange({