Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code review for two-up, pinch-zoom, trackDragging #11

Closed
wants to merge 31 commits into from

Conversation

jakearchibald
Copy link
Collaborator

You can npm i && npm run start in the components folder to build the test page.

See comments for which files to ignore.

@@ -0,0 +1,2 @@
node_modules
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only for the demo stuff. This will be removed in the final merge.

@@ -0,0 +1,12 @@
import './styles.css';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a stub I created for @kosamari. Feel free to ignore.

@@ -0,0 +1,3 @@
multi-panel {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a stub I created for @kosamari. Feel free to ignore.

@@ -0,0 +1,33 @@
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just so I can build the test page. Will be removed in the final merge in favour of the build system @developit is working on.

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="350.7" height="248" viewBox="0 0 1052.4 744.1"><defs><filter id="e" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation=".6"/></filter><radialGradient id="a" cx="22.7" cy="-15" r="3.2" gradientTransform="matrix(1 0 0 2.37143 0 20)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#e7e7e7"/><stop offset="1" stop-color="#565656"/></radialGradient><linearGradient id="b" x1="11.7" x2="10.8" y1="33.6" y2="35.9" gradientTransform="matrix(1.04306 0 0 1.04306 -1 -1.3)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#96d2e2"/><stop offset="1" stop-color="#1d5868"/></linearGradient><radialGradient id="c" cx="25.5" cy="30.7" r="15.2" gradientTransform="matrix(1.55222 0 0 .6192 -14 5.1)" gradientUnits="userSpaceOnUse"><stop offset="0"/><stop offset="1" stop-color="#5e5e5e"/></radialGradient><linearGradient id="d"><stop offset="0" stop-color="#666"/><stop offset="1" stop-color="#ababab" stop-opacity="0"/></linearGradient><radialGradient id="f" cx="22.7" cy="-15" r="3.2" gradientTransform="matrix(1 0 0 2.37143 0 20)" gradientUnits="userSpaceOnUse" xlink:href="#a"/><radialGradient id="g" cx="22.7" cy="-15" r="3.2" gradientTransform="matrix(1 0 0 2.37143 0 20)" gradientUnits="userSpaceOnUse" xlink:href="#a"/><linearGradient id="h" x1="11.7" x2="10.8" y1="33.6" y2="35.9" gradientTransform="matrix(19.56562 0 0 19.56562 -95.6 80)" gradientUnits="userSpaceOnUse" xlink:href="#b"/><radialGradient id="i" cx="25.5" cy="30.7" r="15.2" gradientTransform="matrix(29.1164 0 0 11.61495 -339.2 200.3)" gradientUnits="userSpaceOnUse" xlink:href="#c"/><linearGradient id="j" x1="22.9" x2="21.3" y1="27.2" y2="16.7" gradientTransform="matrix(19.56562 0 0 19.56562 -95.6 80)" gradientUnits="userSpaceOnUse" xlink:href="#d"/><linearGradient id="k" x1="9.6" x2="20.7" y1="29.3" y2="18.3" gradientTransform="matrix(19.56562 0 0 19.56562 -95.6 80)" gradientUnits="userSpaceOnUse" xlink:href="#d"/></defs><g transform="translate(151.9 -274.1)"><path fill="red" d="M131.4 525.2c-14.5 13.5-54.5 6-45.7-25.8 8.9-31.7 47.6-14.8 52 3.2-3 12.2-5.7 12.7-6.3 22.6z"/><path fill="#a00" d="M131.4 525.2c-15.6 16.7-58 1.2-42.1-24 9.7-15.6 28.1-2.1 39.1 14.6-2.9 12.1 3.6-.5 3 9.4z"/><path d="M4.9 37.4c0 2.8 14 8 18.8 7.3 2.4-.4 19.7-13.5 19.2-15.1-2.9-9.8-37.8.3-38 7.8z" filter="url(#e)" opacity=".5" transform="matrix(22.69597 0 0 22.69597 -168.7 -28.5)"/><g color="#000"><path d="M681.8 507.1c-24.2 0-43.8 46.6-43.8 104 0 48 13.8 88.1 32.5 100 16.2 12.2 35 12.5 54 9.5 23.4-2.1 42.1-47.6 42.1-103.6 0-57.3-19.6-103.9-43.8-103.9-18.1 10.3-23.6 3.6-41-6z"/><path fill="url(#f)" d="M27-14.5a3.2 7.7 0 1 1-6.4 0 3.2 7.7 0 1 1 6.5 0z" transform="translate(561.1 715.6) scale(6.78678)"/></g><g color="#000"><path d="M381.4 696.2c-28.5 0-51.7 55-51.7 122.6 0 56.6 16.3 104 38.3 118 19.2 14.5 41.2 14.8 63.8 11.3 27.6-2.6 49.7-56.2 49.7-122.2 0-67.6-23.2-122.6-51.8-122.6-21.3 12.2-27.8 4.2-48.3-7.1z"/><path fill="url(#g)" d="M27-14.5a3.2 7.7 0 1 1-6.4 0 3.2 7.7 0 1 1 6.5 0z" transform="translate(239 942.2) scale(8.00704)"/></g><path fill="#6d0000" d="M120 525c-5.4 10.1-26.7 4.9-27.2-3.3-.9-14.8 32.5-6.9 27.1 3.3z"/><path fill="red" d="M410 303.7c-9.5.3-18.2 1.4-25.7 3-59.7 13.7-136.3 67.3-158 80.8-24.9 15.6-76.2 92-108.8 132.7C99.2 543-49 594.2-60.8 651.6c-5 24-6.9 44-8 61.2v.6c-4.9 9-7.9 21.2-7.9 34.8 0 23.7 10.4 41.3 21.4 49 103 71.7 222 110.3 343.7 135.7 45.2 7.8 96-23.2 96-23.2s-10-138.8 37.9-174.3c57.2-42.5 50 109 67.2 94.8 26.8-22.2 179.7-138 193.2-146.2 13.6-8.1.3-123.2 33.6-145.5 48.9-32.5 43 95.5 55.7 80.1 11.5-13.9 18.6-14.4 21.4-19.5 11.7-6.2 20.2-25.5 20.2-48.3 0-23.7-9.1-43.5-21.4-49-1.6-15.6-4.7-30.3-11.7-40.3-13.8-20-23-31-81.3-45.9a273.6 273.6 0 0 0-78.9-65.4c-35-18.9-143.6-48.5-210.3-46.5z" color="#000"/><path fill="#ff8080" d="M383.1 331.3c-29.2-1-67.8 9.8-118 41-30 18.5 58.5 14.2 177.3 59.8 30 11.6 28.3-97.9-59.3-100.8zM93.3 575.8c-34 .7-71.2 12-109.4 39.2-41.6 29.5 187.1 108.5 295.9 139.4 55.8 15.8-39.3-181.6-186.5-178.6z"/><path fill="#a00" d="M620.4 365.5c-44.1-1.9-147.2 58.7-155.7 79.1-9.1 21.8-34.4 166.5-45.3 181-10.9 14.5-99.8 118.7-109.2 143.5-13.8 36.2-10.1 109.2-10.8 127-.7 15.2-13.8 28-44 29.5 11 2.5 21.9 5 33 7.3 45.2 7.8 96-23.2 96-23.2s-10-138.8 37.9-174.3c57.2-42.5 50 109 67.2 94.8 26.8-22.2 179.6-138 193.2-146.1 13.6-8.2.3-123.3 33.6-145.6 48.9-32.5 43 95.6 55.7 80.1 11.5-13.9 18.6-14.4 21.4-19.5 11.7-6.2 20.2-25.5 20.2-48.3 0-23.7-9.1-43.5-21.4-49-1.7-15.6-4.7-30.3-11.7-40.3a89.6 89.6 0 0 0-17.7-20.8 53.4 53.4 0 0 0-37.3-3.6c-37.4-21.4-63-69.8-105.1-71.6z" color="#000"/><path fill="#a00" d="M335.9 758c-20 5.5.5 14.9-30.8 14.5-33.5-.3-326.4-110.6-359-128.7-5-2.8-16.3 61.7-12.7 70.7 3.6 9 103.4 54.4 163.2 78 59.8 23.6 174 65.2 201.2 63.4C325 854.1 370.4 758 336 758z"/><path fill="none" stroke="#000" stroke-linecap="round" stroke-width="13.3" d="M45.5 757.2L164 802M44.6 724.2l135.8 54.2"/><path fill="url(#h)" d="M-60.8 651.6a435 435 0 0 0-8 56.3l89.4 37.9-17.2-62.4-64.2-31.8zM234 765.4l-40.3 48.3c100.6 40.8 116 41.5 151.6 23.8 21.6-10.7 2-63.4-17.1-53.2-19.2 10.3-42.2-4.8-94.2-19z"/><path fill="#ccc" d="M428.4 305c-44 12-160.5 61.3-169.4 93-4.3 15-51.5 118.6-56.2 126.5-4.8 7.8-130.3 77.3-175.5 157.1l56.2 20.2c45.8-69.8 160.5-140.6 173-151.6 12.6-11 44.2-125 57-145 22.4-35.3 143-85.9 173-93.5l1.8-.6a453.6 453.6 0 0 0-60-6.1zm111.9 17.7c-1.7.4-3.4.3-5 .6-62.6 14.8-151.9 61.5-170.5 93-8 13.5-56.4 143.1-61.2 151-4.7 7.8-108.8 74.3-154 161.4l63.5 22c45.8-77 134.8-151 147.4-162 12.6-11 40.9-129.6 52-150.4 20.7-39 120.1-87.8 183.4-98.5a576.5 576.5 0 0 0-55.6-17.1z"/><path fill="url(#i)" d="M622.2 380.2c-13.6 0-49.5 6.6-38.9 18 15.8 16.7 35.3 64 45.9 92.3 7 18.5 65.2-28 70.6-38.8 8.2-16.3-64-71.5-77.6-71.5zm-381.3 14.3c-2.3 0-3.8.1-4.9.6-16 6.4-98.2 114-100.8 133.3-1.6 11 262.3 96.6 268.4 81.3 10.8-27.2 52.8-148.5 42.2-160.2-10.4-11.3-170.5-55.2-204.9-55zM551.6 409c-13.6 0-66.7 29.1-72.8 43.5-6 14-40.2 143.5-27 147.3 19 5.4 146.3-76.6 151.7-87.4 8.2-16.3-38.4-103.4-52-103.4z"/><path fill="#a00" d="M-72.4 772.7a50.6 50.6 0 0 0 17.1 24.5c103 71.7 222 110.3 343.7 135.7 9.3 1.6 18.8 1 28 0-2.6-29.6-14.8-63.5-16.4-43.4-2 24.7-29.9 19.6-52.6 16.5-59.3-8.2-274.7-95.9-319.8-133.3z" color="#000"/><path fill="#b3b3b3" d="M29.5 781.6l-1 48.1 135.2 52.7v-50L29.4 781.6z"/><path fill="none" stroke="#000" stroke-linecap="round" stroke-width="13.3" d="M39 691.6l162.5 63.7"/><path fill="#6d0000" d="M764 458.4c-22.3 1.5-53.6 23.4-112.5 78.3-91.3 85.2-185.9 64.9-303.2 226.8-27.3 37.7 2.9 57.8-18.9 90.4-21.7 32.7-20.5 60 14 58.2 5.8-.3 21.3-9 40.3-21.4-.8-38 1-127.4 38.6-155.3 45.8-34 55.6 32.1 65.6 79.3 66-49.4 135.1-102 201-153.3 3.6-36.7 2.3-106 27.5-122.9 35-23.3 47.6 19 53.4 61.4 7.4-5.6 13.1-11.5 19.3-16.1a70.5 70.5 0 0 0 24.5-33v-.7c-.2-23.3-9.2-42.8-21.4-48.3-1.6-15.6-4.7-30.3-11.6-40.3-5-2.3-10.6-3.5-16.5-3z"/><path fill="#ff9e00" d="M-60.8 651.6a435 435 0 0 0-8 56.3l16.6 7.3c3.2-23.6 7.5-41.8 11-53.8l-19.6-9.8zm392.6 131.5c-1.2.2-2.5.6-3.7 1.2-9.5 5-19.9 3.5-34.2-.6a261.2 261.2 0 0 0-14.7 60.5c30 7.5 44.6 4 66-6.7 20.2-10 4.4-57-13.4-54.4z"/><path fill="url(#j)" d="M622.2 380.2c-13.6 0-49.8 6.3-39.1 17.7 33.1 7 73.4 19.5 105.7 30.6-19.3-21.8-57.1-48.3-66.6-48.3z"/><path fill="url(#k)" d="M240.7 394.2c-2.3 0-3.8.2-5 .7-16 6.3-98.2 114-100.8 133.2 111.5-62.3 150.8-91.6 182-119.8-33.4-8.2-63.5-14.1-76.2-14z"/><path fill="#f55" d="M-64 729.2c5.3-2.9 160.5 68.3 154 68.9-38.8 3.5-175.4-57.4-154-69z"/><path fill="#fff" d="M371.5 331.3c-6.6.4-13.3 2-20.8 3.6-33.7 15.4-67.5 33.3-83.1 49.5 9.7 3.6 28.1 6.9 53.2 12.3 18.7-19.1 58.9-40.6 96-57.5a83.1 83.1 0 0 0-33.7-8c-3.6 0-7.6-.2-11.6 0zm71 27.5c-31.5 16-58.7 34.4-72.2 50.1a770.6 770.6 0 0 1 52 16.5c8.8-9.7 21.9-19.8 36.6-29.3a81 81 0 0 0-16.5-37.3zm-316.2 220c-32 24.4-66.9 55.1-89.9 88.1 16.2 7.8 35.2 15.3 55 23.3 24.6-32.3 61.9-63.5 94.8-88.7a187.2 187.2 0 0 0-59.9-22.6zm101 52.7c-25 23.3-50.7 52-69.8 83.7a2270 2270 0 0 0 64.8 22 517.8 517.8 0 0 1 45.9-59.3 273 273 0 0 0-41-46.4z"/><path fill="#a00" d="M631.1 532.2c8.6 49 12.9 111 15.8 169.9 10.5-34.4 10.7-123.3-15.8-169.9z"/><path fill="#2b0000" d="M563 396.1c59.9 105.6 72.6 148.1 82.3 302.3C659.9 571.5 617.9 460 563 396z"/><path fill="#a00" d="M460.2 642.1c22.2 56.2 40 120 38.4 172.6 13.2-48-4.7-142.3-38.4-172.6z"/><path fill="#2b0000" d="M439.2 613a485.8 485.8 0 0 1 59.1 194.3c7-75.1-21.9-151.4-59.1-194.3z"/><path fill="red" d="M449.3 622.8c10.7 17.8 62.6 26.8 66.2-5.4 3.6-32.2-39.4-35.8-59-25-31.3 17-7.2 28.6-7.2 30.4z"/><path fill="#a00" d="M449.3 622.8c9 18.3 66.1 27.7 66-8-.2-32.4-42.2-12.7-61.8-11.4-20.2 1.5-9.4 15.8-4.2 19.4z"/><path fill="#6d0000" d="M449.3 622.8c17.2 22.2 59.2 17.4 53.6-2.5-7-24.9-29.4 2.7-47.2-4.3-23-8.9-13.3 5.4-6.4 6.8z"/><rect width="64.8" height="23.2" x="382.1" y="322.8" fill="#1a1a1a" color="#000" opacity=".5" rx="5.3" ry="3.9" transform="matrix(.96122 .27577 -.20533 .9787 0 0)"/><path fill="#6d0000" d="M29.6 784.4c-3.7 10.6-8.2 36.8-1.7 45.8 1.5-12.2 2-28.4 1.7-45.8z"/><path fill="#6d0000" d="M24.5 826.3c3.4 11.3 130.5 59 141.2 55.7-76.4-26.9-139-56.7-141.2-55.7z"/><path fill="#963500" style="marker:none" d="M332 782.8c-1.1.2-3 .6-4.2 1.3-3.4 1.8-7 2.7-10.8 3a249.7 249.7 0 0 0-6 60.3 86.9 86.9 0 0 0 34.3-9.6c20.3-10 4.6-57.6-13.2-55z" color="#000" opacity=".5" overflow="visible"/></g></svg>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the test page.

@@ -0,0 +1,4 @@
declare module "*.svg" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the test page.

@@ -0,0 +1,10 @@
<!DOCTYPE html>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the test page.

@@ -0,0 +1,69 @@
import '@webcomponents/custom-elements';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the test page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although we'll need the event retargeting stuff.

@@ -0,0 +1,41 @@
.container {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for the test page.

@@ -0,0 +1,13 @@
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be merged with the overall project rules.

@@ -0,0 +1,3 @@
{
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be merged with the overall project rules.

@@ -0,0 +1,40 @@
const path = require('path');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be dropped in favour of @developit's build system.

Copy link
Collaborator

@surma surma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of minor things.

I’ll have to give trackDragging.ts another review when my mind works properly 😄

clientY: number;
}

function getDistance (a: Point, b?: Point): number {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why b is optional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convenience really, so the distance is zero when there's only one pointer.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But can that ever happen? Wouldn’t we rather throw a compile-time error when you call this function with just one argument?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It happens a lot – if you're dragging using the mouse, or with one finger on the screen.

Alternatively I could throw an if around every usage of getDistance and getMidpoint, but that feels messier.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair.

* Fire a 'change' event if values are different to current values
*/
allowChangeEvent?: boolean
} = {}) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this notation quite hard to read. WDYT about defining an setTransformOptions type right above?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe even this?

interface setTransformOptions {
    allowChangeEvent?: boolean;
}
const setTransformDefaultOpts: setTransformOptions = {
    allowChangeEvent: false;
};
function setTransform(scale: number, x: number, y: number, opts: setTransformOptions?) {
    opts = { ...setTransformDefaultOpts, ...opts };
    /* ... */
}```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we even go full TypeScript:

const setTransformDefaultOpts = {
    allowChangeEvent: false;
};
function setTransform(scale: number, x: number, y: number, opts: Partial<typeof setTransformDefaultOpts>?) {
    opts = { ...setTransformDefaultOpts, ...opts };
    /* ... */
}

Copy link
Collaborator Author

@jakearchibald jakearchibald Mar 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After in person discussion, we decided:

BAD JakeScript

private _applyChange ({
  panX = 0,
  panY = 0,
  scaleDiff = 1,
  originX = 0,
  originY = 0
}: {
  panX?: number,
  panY?: number,
  scaleDiff?: number,
  originX?: number,
  originY?: number
} = {}) {
  // …
}

HalloumiScript

interface ApplyChangeOpts {
  panX?: number;
  panY?: number;
  scaleDiff?: number;
  originX?: number;
  originY?: number;
}
private _applyChange (opts: ApplyChangeOpts = {}) {
  const {
    panX = 0, panY = 0,
    originX = 0, originY = 0,
    scaleDiff = 1
  } = opts;
  // …
}

Any objections / better ideas @developit @kosamari?

* Update the stage with a given scale/x/y.
*/
setTransform (scale: number = this._scale, x: number = this._x, y: number = this._y, {
allowChangeEvent = false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: fireChangeEvent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the same, but doesn't fireChangeEvent make it sound like it will fire a change event, whereas in reality it might not, if the provided values match the current state, or are clamped to be equal to the current state?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the word “change” covers that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@developit @kosamari what do you think?

pinchZoom.setTransform(1, 100, 100, {
  allowChangeEvent: true
});

Or fireChangeEvent?

If you set this property to true, it may not fire a change event, eg if the supplied or computed values are the same as the current transform.

this.style.setProperty('--scale', this._scale + '');

if (allowChangeEvent) {
const event = new Event('change', { bubbles: true });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s our stance on re-using platform events? Should CEs always fire CustomEvent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asked in web platform kin.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the only reason to use CustomEvent is for .detail, which we don't need here (and wouldn't want to use in TypeScript).

private _stageElChange () {
this._positioningEl = undefined;

if (this.children.length === 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, crazy idea: this.children.length === 1 && this.children[0] instanceof HTMLElement

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why _positioningEl needs to be an HTMLElement. I complained at one point, but I've refactored since, so it shouldn't be an issue.

border-radius: 20px;
}

two-up > :nth-child(1):not(.two-up-handle) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the second :not() necessary considering the code makes sure that the handle is always the last child?

Copy link
Collaborator Author

@jakearchibald jakearchibald Mar 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no children other than the handle it'll be both the last and first child.

start = () => true,
move = noop,
end = noop
}: PointerTrackerCallbacks) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

this._endCallback = end;

// Bind listener methods
this._pointerStart = this._pointerStart.bind(this);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bind?

*/
private _pointerStart (event: PointerEvent | MouseEvent) {
// Only interested in left-button presses.
if (event.button !== 0) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe define an enum for LEFT_BUTTON?

*/
private _move (event: PointerEvent | MouseEvent | TouchEvent) {
const previousPointers = this.currentPointers.slice();
const changedPointers = ('changedTouches' in event) ?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use isPointerEvent here?

start = () => true,
move = noop,
end = noop
}: PointerTrackerCallbacks) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

this._endCallback = end;

// Bind listener methods
this._pointerStart = this._pointerStart.bind(this);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe amend when I merge - I exported it from src/lib/util.ts

*/
private _pointerStart (event: PointerEvent | MouseEvent) {
// Only interested in left-button presses.
if (event.button !== 0) return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe define an enum for LEFT_BUTTON?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL const enum in TypeScript.

I'd avoided enums previously because of the objects they create.

*/
private _move (event: PointerEvent | MouseEvent | TouchEvent) {
const previousPointers = this.currentPointers.slice();
const changedPointers = ('changedTouches' in event) ?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use isPointerEvent here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is checking for a touch event, not a pointer event.

I could replace this with: self.TouchEvent && event instanceof TouchEvent, but I went for the property check since it's smaller.

@jakearchibald
Copy link
Collaborator Author

I still need to take a look at setTransform in pinch-zoom, but my brain's tired. I botched a refactor. I need to ensure that transforms can be set before the element is connected, and that bounds are checked when setTransform is called.

Also, bounds should be checked on connect.

@jakearchibald
Copy link
Collaborator Author

Thanks for the review @surma! Good to see some conventions for the rest of the project coming out of this.

@jakearchibald
Copy link
Collaborator Author

I've fixed the pinch-zoom stuff. setTransform is now the main method for changing transforms & performs all the bounds checks.

this.clientX = nativePointer.clientX;
this.clientY = nativePointer.clientY;

if (self.Touch && nativePointer instanceof Touch) {
Copy link
Collaborator

@surma surma May 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put this in a isTouchPointer() like isPointerEvent()?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only used once. Happy to put it in a function if you'd prefer though.

*/
private _move (event: PointerEvent | MouseEvent | TouchEvent) {
const previousPointers = this.currentPointers.slice();
const changedPointers = ('changedTouches' in event) ? // Shortcut for 'is touch event'.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-use isTouchEvent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no such method

Copy link
Collaborator

@surma surma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, since we deferred @bind, I am okay with finally going ahead with this (sorry!)

@jakearchibald
Copy link
Collaborator Author

Closing this, as I'm rolling the components into master.

@jakearchibald jakearchibald deleted the components branch October 2, 2018 14:16
alisaitbilgi added a commit to alisaitbilgi/squoosh that referenced this pull request Feb 25, 2019
# This is the 1st commit message:
Add position reset button and update zoom interaction. (GoogleChromeLabs#292) (GoogleChromeLabs#345)

# The commit message GoogleChromeLabs#2 will be skipped:

#	1.2.3

# The commit message GoogleChromeLabs#3 will be skipped:

#	Prevent both sides sharing a download URL. (GoogleChromeLabs#369)
#

# The commit message GoogleChromeLabs#4 will be skipped:

#	Add basic history handling (GoogleChromeLabs#288) (GoogleChromeLabs#309)
#
#	* Add basic history handling (GoogleChromeLabs#288)
#
#	* Move history management to Compress component
#
#	* Remove unused pathname property from history
#
#	* Rename history listener functions
#
#	* Use history.back instead of history.replace
#
#	* Support going forward in history. Persist last selected file in runtime
#
#	* Add netlify redirects file
#
#	* Use 301 status code for redirect
#
#	* Cleanup _redirects file
#
#	* Use 200 status code for redirects
#
#	* Simplify onPopState function
#
#	* Always redirect to 301 with url rewrite
#
#	* Remove redundant history function
#
#	* Remove file check on render. Call openEditor synchronously
#
#	* Use pushState only if user is on the initial screen. Mount history listener in constructor
#
#	* Simplify openEditor condition
#
#	* Update early return condition
#
#	* Rolling abstractions back into the main component

# The commit message GoogleChromeLabs#5 will be skipped:

#	1.3.0

# The commit message GoogleChromeLabs#6 will be skipped:

#	Add renovate.json

# The commit message GoogleChromeLabs#7 will be skipped:

#	Merge pull request GoogleChromeLabs#373 from GoogleChromeLabs/renovate/configure
#
#	Configure Renovate

# The commit message GoogleChromeLabs#8 will be skipped:

#	Pin dependencies

# The commit message GoogleChromeLabs#9 will be skipped:

#	Merge pull request GoogleChromeLabs#374 from GoogleChromeLabs/renovate/pin-dependencies
#
#	Pin dependencies

# The commit message GoogleChromeLabs#10 will be skipped:

#	Update dependency mini-css-extract-plugin to v0.5.0

# The commit message GoogleChromeLabs#11 will be skipped:

#	Merge pull request GoogleChromeLabs#380 from GoogleChromeLabs/renovate/mini-css-extract-plugin-0.x
#
#	Update dependency mini-css-extract-plugin to v0.5.0

# The commit message GoogleChromeLabs#12 will be skipped:

#	Update dependency @types/node to v10.12.14

# The commit message GoogleChromeLabs#13 will be skipped:

#	Merge pull request GoogleChromeLabs#376 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.14

# The commit message GoogleChromeLabs#14 will be skipped:

#	Update dependency @types/node to v10.12.15

# The commit message GoogleChromeLabs#15 will be skipped:

#	Merge pull request GoogleChromeLabs#384 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.15

# The commit message GoogleChromeLabs#16 will be skipped:

#	Update dependency comlink to v3.1.1

# The commit message GoogleChromeLabs#17 will be skipped:

#	Merge pull request GoogleChromeLabs#377 from GoogleChromeLabs/renovate/comlink-3.x
#
#	Update dependency comlink to v3.1.1

# The commit message GoogleChromeLabs#18 will be skipped:

#	Update dependency @types/webassembly-js-api to v0.0.2

# The commit message GoogleChromeLabs#19 will be skipped:

#	Merge pull request GoogleChromeLabs#375 from GoogleChromeLabs/renovate/webassembly-js-api-0.x
#
#	Update dependency @types/webassembly-js-api to v0.0.2

# The commit message GoogleChromeLabs#20 will be skipped:

#	Update dependency critters-webpack-plugin to v2.1.1

# The commit message GoogleChromeLabs#21 will be skipped:

#	Merge pull request GoogleChromeLabs#378 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x
#
#	Update dependency critters-webpack-plugin to v2.1.1

# The commit message GoogleChromeLabs#22 will be skipped:

#	Update dependency husky to v1.2.1

# The commit message GoogleChromeLabs#23 will be skipped:

#	Merge pull request GoogleChromeLabs#379 from GoogleChromeLabs/renovate/husky-1.x
#
#	Update dependency husky to v1.2.1

# The commit message GoogleChromeLabs#24 will be skipped:

#	Update dependency preact to v8.4.2

# The commit message GoogleChromeLabs#25 will be skipped:

#	Merge pull request GoogleChromeLabs#381 from GoogleChromeLabs/renovate/preact-8.x
#
#	Update dependency preact to v8.4.2

# The commit message GoogleChromeLabs#26 will be skipped:

#	Update dependency ts-loader to v5.3.1

# The commit message GoogleChromeLabs#27 will be skipped:

#	Merge pull request GoogleChromeLabs#382 from GoogleChromeLabs/renovate/ts-loader-5.x
#
#	Update dependency ts-loader to v5.3.1

# The commit message GoogleChromeLabs#28 will be skipped:

#	Update dependency tslint-config-airbnb to v5.11.1

# The commit message GoogleChromeLabs#29 will be skipped:

#	Merge pull request GoogleChromeLabs#383 from GoogleChromeLabs/renovate/tslint-config-airbnb-5.x
#
#	Update dependency tslint-config-airbnb to v5.11.1

# The commit message GoogleChromeLabs#30 will be skipped:

#	Update dependency webpack to v4.27.1

# The commit message GoogleChromeLabs#31 will be skipped:

#	Merge pull request GoogleChromeLabs#386 from GoogleChromeLabs/renovate/webpack-4.x
#
#	Update dependency webpack to v4.27.1

# The commit message GoogleChromeLabs#32 will be skipped:

#	Update dependency raw-loader to v1

# The commit message GoogleChromeLabs#33 will be skipped:

#	Merge pull request GoogleChromeLabs#388 from GoogleChromeLabs/renovate/raw-loader-1.x
#
#	Update dependency raw-loader to v1

# The commit message GoogleChromeLabs#34 will be skipped:

#	Update dependency worker-plugin to v3

# The commit message GoogleChromeLabs#35 will be skipped:

#	Merge pull request GoogleChromeLabs#390 from GoogleChromeLabs/renovate/worker-plugin-3.x
#
#	Update dependency worker-plugin to v3

# The commit message GoogleChromeLabs#36 will be skipped:

#	Fixing sharp & preprocess settings

# The commit message GoogleChromeLabs#37 will be skipped:

#	Using use_argb conditionally

# The commit message GoogleChromeLabs#38 will be skipped:

#	Merge pull request GoogleChromeLabs#393 from GoogleChromeLabs/webp-sharp-fix
#
#	Fixing sharp & preprocess settings. Fixes GoogleChromeLabs#392.

# The commit message GoogleChromeLabs#39 will be skipped:

#	Debouncing input. Fixes GoogleChromeLabs#277 (GoogleChromeLabs#394)
#
#	* Debouncing input
#
#	* Clarifying comment
#
#	* More comments and clarifications

# The commit message GoogleChromeLabs#40 will be skipped:

#	Update dependency typescript to v3.2.2

# The commit message GoogleChromeLabs#41 will be skipped:

#	Fix typings for TypeScript v3.2

# The commit message GoogleChromeLabs#42 will be skipped:

#	Merge pull request GoogleChromeLabs#385 from GoogleChromeLabs/renovate/typescript-3.x
#
#	Update dependency typescript to v3.2.2

# The commit message GoogleChromeLabs#43 will be skipped:

#	Preventing zoom in iOS Safari. (GoogleChromeLabs#395)
#

# The commit message GoogleChromeLabs#44 will be skipped:

#	Update README.md
#
#	closes GoogleChromeLabs#367
#	updating incorrect URL

# The commit message GoogleChromeLabs#45 will be skipped:

#	Merge pull request GoogleChromeLabs#396 from GoogleChromeLabs/kosamari-patch-2
#
#	Update README.md for OptiPNG

# The commit message GoogleChromeLabs#46 will be skipped:

#	1.3.1

# The commit message GoogleChromeLabs#47 will be skipped:

#	Update dependency tslint to v5.12.0

# The commit message GoogleChromeLabs#48 will be skipped:

#	Merge pull request GoogleChromeLabs#398 from GoogleChromeLabs/renovate/tslint-5.x
#
#	Update dependency tslint to v5.12.0

# The commit message GoogleChromeLabs#49 will be skipped:

#	Update dependency husky to v1.3.0

# The commit message GoogleChromeLabs#50 will be skipped:

#	Merge pull request GoogleChromeLabs#399 from GoogleChromeLabs/renovate/husky-1.x
#
#	Update dependency husky to v1.3.0

# The commit message GoogleChromeLabs#51 will be skipped:

#	Update dependency @types/node to v10.12.17

# The commit message GoogleChromeLabs#52 will be skipped:

#	Merge pull request GoogleChromeLabs#400 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.17

# The commit message GoogleChromeLabs#53 will be skipped:

#	Update dependency webpack to v4.28.0

# The commit message GoogleChromeLabs#54 will be skipped:

#	Merge pull request GoogleChromeLabs#402 from GoogleChromeLabs/renovate/webpack-4.x
#
#	Update dependency webpack to v4.28.0

# The commit message GoogleChromeLabs#55 will be skipped:

#	Update dependency @types/node to v10.12.18

# The commit message GoogleChromeLabs#56 will be skipped:

#	Merge pull request GoogleChromeLabs#403 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.18

# The commit message GoogleChromeLabs#57 will be skipped:

#	Update dependency file-loader to v3

# The commit message GoogleChromeLabs#58 will be skipped:

#	Merge pull request GoogleChromeLabs#404 from GoogleChromeLabs/renovate/file-loader-3.x
#
#	Update dependency file-loader to v3

# The commit message GoogleChromeLabs#59 will be skipped:

#	Update dependency ts-loader to v5.3.2

# The commit message GoogleChromeLabs#60 will be skipped:

#	Merge pull request GoogleChromeLabs#406 from GoogleChromeLabs/renovate/ts-loader-5.x
#
#	Update dependency ts-loader to v5.3.2

# The commit message GoogleChromeLabs#61 will be skipped:

#	Update dependency webpack-dev-server to v3.1.11

# The commit message GoogleChromeLabs#62 will be skipped:

#	Merge pull request GoogleChromeLabs#407 from GoogleChromeLabs/renovate/webpack-dev-server-3.x
#
#	Update dependency webpack-dev-server to v3.1.11

# The commit message GoogleChromeLabs#63 will be skipped:

#	Update dependency webpack-dev-server to v3.1.12

# The commit message GoogleChromeLabs#64 will be skipped:

#	Merge pull request GoogleChromeLabs#408 from GoogleChromeLabs/renovate/webpack-dev-server-3.x
#
#	Update dependency webpack-dev-server to v3.1.12

# The commit message GoogleChromeLabs#65 will be skipped:

#	Update dependency terser-webpack-plugin to v1.2.0

# The commit message GoogleChromeLabs#66 will be skipped:

#	Merge pull request GoogleChromeLabs#409 from GoogleChromeLabs/renovate/terser-webpack-plugin-1.x
#
#	Update dependency terser-webpack-plugin to v1.2.0

# The commit message GoogleChromeLabs#67 will be skipped:

#	Update dependency webpack-dev-server to v3.1.13

# The commit message GoogleChromeLabs#68 will be skipped:

#	Merge pull request GoogleChromeLabs#410 from GoogleChromeLabs/renovate/webpack-dev-server-3.x
#
#	Update dependency webpack-dev-server to v3.1.13

# The commit message GoogleChromeLabs#69 will be skipped:

#	Update dependency webpack-dev-server to v3.1.14

# The commit message GoogleChromeLabs#70 will be skipped:

#	Merge pull request GoogleChromeLabs#411 from GoogleChromeLabs/renovate/webpack-dev-server-3.x
#
#	Update dependency webpack-dev-server to v3.1.14

# The commit message GoogleChromeLabs#71 will be skipped:

#	Update dependency loader-utils to v1.2.0

# The commit message GoogleChromeLabs#72 will be skipped:

#	Merge pull request GoogleChromeLabs#412 from GoogleChromeLabs/renovate/loader-utils-1.x
#
#	Update dependency loader-utils to v1.2.0

# The commit message GoogleChromeLabs#73 will be skipped:

#	Update dependency terser-webpack-plugin to v1.2.1

# The commit message GoogleChromeLabs#74 will be skipped:

#	Merge pull request GoogleChromeLabs#414 from GoogleChromeLabs/renovate/terser-webpack-plugin-1.x
#
#	Update dependency terser-webpack-plugin to v1.2.1

# The commit message GoogleChromeLabs#75 will be skipped:

#	Update dependency husky to v1.3.1

# The commit message GoogleChromeLabs#76 will be skipped:

#	Merge pull request GoogleChromeLabs#418 from GoogleChromeLabs/renovate/husky-1.x
#
#	Update dependency husky to v1.3.1

# The commit message GoogleChromeLabs#77 will be skipped:

#	Update dependency webpack-cli to v3.2.0

# The commit message GoogleChromeLabs#78 will be skipped:

#	Merge pull request GoogleChromeLabs#421 from GoogleChromeLabs/renovate/webpack-cli-3.x
#
#	Update dependency webpack-cli to v3.2.0

# The commit message GoogleChromeLabs#79 will be skipped:

#	Update dependency @webpack-cli/serve to v0.1.3

# The commit message GoogleChromeLabs#80 will be skipped:

#	Merge pull request GoogleChromeLabs#420 from GoogleChromeLabs/renovate/webpack-cli-serve-0.x
#
#	Update dependency @webpack-cli/serve to v0.1.3

# The commit message GoogleChromeLabs#81 will be skipped:

#	Update dependency critters-webpack-plugin to v2.1.2

# The commit message GoogleChromeLabs#82 will be skipped:

#	Merge pull request GoogleChromeLabs#415 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x
#
#	Update dependency critters-webpack-plugin to v2.1.2

# The commit message GoogleChromeLabs#83 will be skipped:

#	Update dependency ts-loader to v5.3.3

# The commit message GoogleChromeLabs#84 will be skipped:

#	Merge pull request GoogleChromeLabs#423 from GoogleChromeLabs/renovate/ts-loader-5.x
#
#	Update dependency ts-loader to v5.3.3

# The commit message GoogleChromeLabs#85 will be skipped:

#	Update dependency critters-webpack-plugin to v2.1.3

# The commit message GoogleChromeLabs#86 will be skipped:

#	Merge pull request GoogleChromeLabs#422 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x
#
#	Update dependency critters-webpack-plugin to v2.1.3

# The commit message GoogleChromeLabs#87 will be skipped:

#	Update dependency webpack-cli to v3.2.1

# The commit message GoogleChromeLabs#88 will be skipped:

#	Merge pull request GoogleChromeLabs#424 from GoogleChromeLabs/renovate/webpack-cli-3.x
#
#	Update dependency webpack-cli to v3.2.1

# The commit message GoogleChromeLabs#89 will be skipped:

#	Update dependency tslint to v5.12.1

# The commit message GoogleChromeLabs#90 will be skipped:

#	Merge pull request GoogleChromeLabs#427 from GoogleChromeLabs/renovate/tslint-5.x
#
#	Update dependency tslint to v5.12.1

# The commit message GoogleChromeLabs#91 will be skipped:

#	Update dependency typescript to v3.2.4

# The commit message GoogleChromeLabs#92 will be skipped:

#	Merge pull request GoogleChromeLabs#431 from GoogleChromeLabs/renovate/typescript-3.x
#
#	Update dependency typescript to v3.2.4

# The commit message GoogleChromeLabs#93 will be skipped:

#	Update dependency critters-webpack-plugin to v2.2.0

# The commit message GoogleChromeLabs#94 will be skipped:

#	Merge pull request GoogleChromeLabs#432 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x
#
#	Update dependency critters-webpack-plugin to v2.2.0

# The commit message GoogleChromeLabs#95 will be skipped:

#	Update dependency clean-webpack-plugin to v1.0.1

# The commit message GoogleChromeLabs#96 will be skipped:

#	Merge pull request GoogleChromeLabs#434 from GoogleChromeLabs/renovate/clean-webpack-plugin-1.x
#
#	Update dependency clean-webpack-plugin to v1.0.1

# The commit message GoogleChromeLabs#97 will be skipped:

#	Update dependency progress-bar-webpack-plugin to v1.12.0

# The commit message GoogleChromeLabs#98 will be skipped:

#	Merge pull request GoogleChromeLabs#435 from GoogleChromeLabs/renovate/progress-bar-webpack-plugin-1.x
#
#	Update dependency progress-bar-webpack-plugin to v1.12.0

# The commit message GoogleChromeLabs#99 will be skipped:

#	Add rotate user timing

# The commit message GoogleChromeLabs#100 will be skipped:

#	Use Uint32Array to copy an entire pixel per op

# The commit message GoogleChromeLabs#101 will be skipped:

#	Revert "Add rotate user timing"
#
#	This reverts commit 887db67.

# The commit message GoogleChromeLabs#102 will be skipped:

#	Remove unused bpp

# The commit message GoogleChromeLabs#103 will be skipped:

#	Merge pull request GoogleChromeLabs#436 from GoogleChromeLabs/optimize-rotate
#
#	Optimize rotate

# The commit message GoogleChromeLabs#104 will be skipped:

#	Update dependency @types/node to v10.12.19

# The commit message GoogleChromeLabs#105 will be skipped:

#	Merge pull request GoogleChromeLabs#441 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.19

# The commit message GoogleChromeLabs#106 will be skipped:

#	Update dependency progress-bar-webpack-plugin to v1.12.1

# The commit message GoogleChromeLabs#107 will be skipped:

#	Merge pull request GoogleChromeLabs#442 from GoogleChromeLabs/renovate/progress-bar-webpack-plugin-1.x
#
#	Update dependency progress-bar-webpack-plugin to v1.12.1

# The commit message GoogleChromeLabs#108 will be skipped:

#	Update dependency @types/node to v10.12.20

# The commit message GoogleChromeLabs#109 will be skipped:

#	Merge pull request GoogleChromeLabs#443 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.20

# The commit message GoogleChromeLabs#110 will be skipped:

#	Update dependency @types/node to v10.12.21

# The commit message GoogleChromeLabs#111 will be skipped:

#	Merge pull request GoogleChromeLabs#445 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.21

# The commit message GoogleChromeLabs#112 will be skipped:

#	This fixes GoogleChromeLabs#446 and sometimes it's best not to ask too many questions. (GoogleChromeLabs#447)
#

# The commit message GoogleChromeLabs#113 will be skipped:

#	Update dependency terser-webpack-plugin to v1.2.2

# The commit message GoogleChromeLabs#114 will be skipped:

#	Merge pull request GoogleChromeLabs#448 from GoogleChromeLabs/renovate/terser-webpack-plugin-1.x
#
#	Update dependency terser-webpack-plugin to v1.2.2

# The commit message GoogleChromeLabs#115 will be skipped:

#	# This is a combination of 20 commits.
#	# This is the 1st commit message:
#	Merge from upstream/master branch
#
#	# This is the commit message GoogleChromeLabs#2:
#
#	Update zoom and positioning behaviours
#
#	# This is the commit message GoogleChromeLabs#3:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#4:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#5:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#6:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#7:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#8:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#9:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#10:
#
#	Merge branch 'master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#11:
#
#	Merge from remote branch
#
#	# This is the commit message GoogleChromeLabs#12:
#
#	Merge from upstream/master
#
#	# This is the commit message GoogleChromeLabs#13:
#
#	Lazy-load the intersection-observer polyfill and optionally control wheel event
#
#	# This is the commit message GoogleChromeLabs#14:
#
#	Fix threshold handling issue
#
#	# This is the commit message GoogleChromeLabs#15:
#
#	merge remote-tracking branch 'upstream/master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#16:
#
#	merge remote-tracking branch 'upstream/master' into update-zoom-interaction
#
#	# This is the commit message GoogleChromeLabs#17:
#
#	Update double click listener and position reset behaviour
#
#	# This is the commit message GoogleChromeLabs#18:
#
#	Change back the indentations
#
#	# This is the commit message GoogleChromeLabs#19:
#
#	Update double click listener and position reset behaviour
#
#	# This is the commit message GoogleChromeLabs#20:
#
#	Change back the indentations

# The commit message GoogleChromeLabs#116 will be skipped:

#	Merge from upstream/master branch

# The commit message GoogleChromeLabs#117 will be skipped:

#	Update zoom and positioning behaviours

# The commit message GoogleChromeLabs#118 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#119 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#120 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#121 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#122 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#123 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#124 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#125 will be skipped:

#	Merge branch 'master' into update-zoom-interaction

# The commit message GoogleChromeLabs#126 will be skipped:

#	Merge from remote branch

# The commit message GoogleChromeLabs#127 will be skipped:

#	Update dependency webpack-cli to v3.2.3

# The commit message GoogleChromeLabs#128 will be skipped:

#	Merge pull request GoogleChromeLabs#449 from GoogleChromeLabs/renovate/webpack-cli-3.x
#
#	Update dependency webpack-cli to v3.2.3

# The commit message GoogleChromeLabs#129 will be skipped:

#	Update libwebp to 1.0.2 (GoogleChromeLabs#439)
#
#	* Update package.json
#
#	* Update package.json
#
#	* Update README.md
#
#	* Update README.md
#
#	* Use cmake for libwebp
#
#	* Minimize libwebp

# The commit message GoogleChromeLabs#130 will be skipped:

#	Update dependency chokidar to v2.1.0

# The commit message GoogleChromeLabs#131 will be skipped:

#	Merge pull request GoogleChromeLabs#451 from GoogleChromeLabs/renovate/chokidar-2.x
#
#	Update dependency chokidar to v2.1.0

# The commit message GoogleChromeLabs#132 will be skipped:

#	Update dependency loader-utils to v1.2.3

# The commit message GoogleChromeLabs#133 will be skipped:

#	Merge pull request GoogleChromeLabs#413 from GoogleChromeLabs/renovate/loader-utils-1.x
#
#	Update dependency loader-utils to v1.2.3

# The commit message GoogleChromeLabs#134 will be skipped:

#	Update dependency @types/node to v10.12.23

# The commit message GoogleChromeLabs#135 will be skipped:

#	Merge pull request GoogleChromeLabs#453 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.23

# The commit message GoogleChromeLabs#136 will be skipped:

#	Merge from upstream/master

# The commit message GoogleChromeLabs#137 will be skipped:

#	Lazy-load the intersection-observer polyfill and optionally control wheel event

# The commit message GoogleChromeLabs#138 will be skipped:

#	Fix threshold handling issue

# The commit message GoogleChromeLabs#139 will be skipped:

#	Adding CI step to compare build size to previous master build. (GoogleChromeLabs#450)
#

# The commit message GoogleChromeLabs#140 will be skipped:

#	no one must know I did this, or that it got through review.

# The commit message GoogleChromeLabs#141 will be skipped:

#	Pin dependencies (GoogleChromeLabs#456)
#

# The commit message GoogleChromeLabs#142 will be skipped:

#	Switching to 1.4x rather than 140%

# The commit message GoogleChromeLabs#143 will be skipped:

#	Rotate implementation in Rust

# The commit message GoogleChromeLabs#144 will be skipped:

#	Reuse rotate instance and calculate pages correctly

# The commit message GoogleChromeLabs#145 will be skipped:

#	Update wasm build

# The commit message GoogleChromeLabs#146 will be skipped:

#	Merge pull request GoogleChromeLabs#438 from GoogleChromeLabs/rust-rotate
#
#	Rotate implementation in Rust

# The commit message GoogleChromeLabs#147 will be skipped:

#	Fix buffer size/offset calculations in rotate/processor.ts

# The commit message GoogleChromeLabs#148 will be skipped:

#	Merge pull request GoogleChromeLabs#458 from jviide/rust-rotate
#
#	Fix buffer offset/size calculations in rotate/processor.ts

# The commit message GoogleChromeLabs#149 will be skipped:

#	1.3.2

# The commit message GoogleChromeLabs#150 will be skipped:

#	Update dependency webpack-bundle-analyzer to v3.0.4

# The commit message GoogleChromeLabs#151 will be skipped:

#	Merge pull request GoogleChromeLabs#459 from GoogleChromeLabs/renovate/webpack-bundle-analyzer-3.x
#
#	Update dependency webpack-bundle-analyzer to v3.0.4

# The commit message GoogleChromeLabs#152 will be skipped:

#	Update dependency @types/node to v10.12.25

# The commit message GoogleChromeLabs#153 will be skipped:

#	Merge pull request GoogleChromeLabs#455 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.25

# The commit message GoogleChromeLabs#154 will be skipped:

#	Update dependency chokidar to v2.1.1

# The commit message GoogleChromeLabs#155 will be skipped:

#	Merge pull request GoogleChromeLabs#457 from GoogleChromeLabs/renovate/chokidar-2.x
#
#	Update dependency chokidar to v2.1.1

# The commit message GoogleChromeLabs#156 will be skipped:

#	Update dependency @types/node to v10.12.26

# The commit message GoogleChromeLabs#157 will be skipped:

#	Merge pull request GoogleChromeLabs#461 from GoogleChromeLabs/renovate/node-10.x
#
#	Update dependency @types/node to v10.12.26

# The commit message GoogleChromeLabs#158 will be skipped:

#	Updating package lock to fix Netlify

# The commit message GoogleChromeLabs#159 will be skipped:

#	Make Rust rotate code smaller (GoogleChromeLabs#462)
#
#	* Make Rust rotate code smaller
#
#	* Back on the rust happy path

# The commit message GoogleChromeLabs#160 will be skipped:

#	1.3.3

# The commit message GoogleChromeLabs#161 will be skipped:

#	Update dependency chokidar to v2.1.2

# The commit message GoogleChromeLabs#162 will be skipped:

#	Merge pull request GoogleChromeLabs#467 from GoogleChromeLabs/renovate/chokidar-2.x
#
#	Update dependency chokidar to v2.1.2

# The commit message GoogleChromeLabs#163 will be skipped:

#	merge remote-tracking branch 'upstream/master' into update-zoom-interaction

# The commit message GoogleChromeLabs#164 will be skipped:

#	Update double click listener and position reset behaviour

# The commit message GoogleChromeLabs#165 will be skipped:

#	Change back the indentations

# The commit message GoogleChromeLabs#166 will be skipped:

#	Update double click listener and position reset behaviour

# The commit message GoogleChromeLabs#167 will be skipped:

#	Change back the indentations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants