From 9ad301d639c3f53c165592cc1f9e9f5ac85c2a0f Mon Sep 17 00:00:00 2001 From: Holger Stitz Date: Mon, 22 Aug 2022 14:29:08 +0200 Subject: [PATCH] Replace jquery scrollTo plugin with custom impl --- .yo-rc.json | 4 +- dist/internal/ViewWrapper.d.ts | 1 - dist/internal/ViewWrapper.d.ts.map | 2 +- dist/internal/ViewWrapper.js | 55 ++++++++++++++++++++++---- dist/internal/ViewWrapper.js.map | 2 +- package.json | 3 -- src/internal/ViewWrapper.ts | 63 ++++++++++++++++++++++++++---- 7 files changed, 107 insertions(+), 23 deletions(-) diff --git a/.yo-rc.json b/.yo-rc.json index 2d0451c8..e3d79468 100644 --- a/.yo-rc.json +++ b/.yo-rc.json @@ -32,9 +32,7 @@ }, "app": "ordino", "libraryAliases": { - "d3": "d3/d3", - "scrollTo": "jquery.scrollto/jquery.scrollTo.js", - "jquery": "jquery/dist/jquery" + "d3": "d3/d3" }, "libraryExternals": [], "ignores": [], diff --git a/dist/internal/ViewWrapper.d.ts b/dist/internal/ViewWrapper.d.ts index f8611b28..34529b0a 100644 --- a/dist/internal/ViewWrapper.d.ts +++ b/dist/internal/ViewWrapper.d.ts @@ -6,7 +6,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. ******************************************************************* */ import { IObjectRef, ProvenanceGraph, EventHandler, IPlugin, IPluginDesc, EViewMode, ISelection, IView, IViewContext } from 'tdp_core'; -import 'jquery.scrollto/jquery.scrollTo.js'; export declare class ViewWrapper extends EventHandler { private readonly graph; selection: ISelection; diff --git a/dist/internal/ViewWrapper.d.ts.map b/dist/internal/ViewWrapper.d.ts.map index 2612d3eb..54bc4a16 100644 --- a/dist/internal/ViewWrapper.d.ts.map +++ b/dist/internal/ViewWrapper.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ViewWrapper.d.ts","sourceRoot":"","sources":["../../src/internal/ViewWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;uEAMuE;AAEvE,OAAO,EACL,UAAU,EAEV,e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AAY,EAAE,WAAW,EACzB,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,UAAU,GAAG,IAAI,EAChC,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,OAAO,EAClB,OAAO,CAAC,KAAA;CAIX"} \ No newline at end of file diff --git a/dist/internal/ViewWrapper.js b/dist/internal/ViewWrapper.js index fa82a461..a8e142a1 100644 --- a/dist/internal/ViewWrapper.js +++ b/dist/internal/ViewWrapper.js @@ -7,9 +7,6 @@ ******************************************************************* */ import { ObjectRefUtils, EventHandler, TDPApplicationUtils, AView, EViewMode, ViewUtils, } from 'tdp_core'; import * as d3v3 from 'd3v3'; -import * as $ from 'jquery'; -// eslint-disable-next-line import/extensions -import 'jquery.scrollto/jquery.scrollTo.js'; import { MODE_ANIMATION_TIME } from './constants'; function generateHash(desc, selection) { const s = `${selection.idtype ? selection.idtype.id : ''}r${selection.ids}`; @@ -25,6 +22,51 @@ const previousSiblings = (elem) => { } return siblings; }; +/** + * Scrolls an element to the given horizontal target position (i.e., x-axis). + * This function is a modified version from https://medium.com/@snowleo208/how-to-create-smooth-scroll-for-your-website-ce5b198d9d94 + * + * @param element HTML element that will be scrolled + * @param target Horizontal target position + * @param duration Duration of the animation (default: 600 ms) + */ +function scrollTo(element, target, duration = 600) { + let start = null; + const firstPosX = element.scrollLeft || 0; + let posX = 0; + (function () { + const browser = ['ms', 'moz', 'webkit', 'o']; + for (let x = 0, { length } = browser; x < length && !window.requestAnimationFrame; x++) { + window.requestAnimationFrame = window[`${browser[x]}RequestAnimationFrame`]; + window.cancelAnimationFrame = window[`${browser[x]}CancelAnimationFrame`] || window[`${browser[x]}CancelRequestAnimationFrame`]; + } + })(); + function showAnimation(timestamp) { + if (!start) { + start = timestamp || new Date().getTime(); + } // get id of animation + const elapsed = timestamp - start; + const progress = elapsed / duration; // animation duration + // ease in function from https://github.com/component/ease/blob/master/index.js + const outQuad = function (n) { + return n * (2 - n); + }; + const easeInPercentage = +outQuad(progress).toFixed(2); + // if target is 0 (back to left), the position is: current pos + (current pos * percentage of duration) + // if target > 0 (not back to left), the positon is current pos + (target pos * percentage of duration) + posX = target === 0 ? firstPosX - firstPosX * easeInPercentage : firstPosX + target * easeInPercentage; + element.scrollTo(posX, 0); + // console.log(posX, target, firstPosX, progress); + if ((target !== 0 && posX >= firstPosX + target) || (target === 0 && posX <= 0)) { + cancelAnimationFrame(start); + posX = 0; + } + else { + window.requestAnimationFrame(showAnimation); + } + } + window.requestAnimationFrame(showAnimation); +} export class ViewWrapper extends EventHandler { /** * Initialize this view, create the root node and the (inner) view @@ -242,10 +284,9 @@ export class ViewWrapper extends EventHandler { }, MODE_ANIMATION_TIME); } scrollIntoView() { - const prev = this.$viewWrapper.node().previousSibling; - const scrollToPos = prev ? prev.offsetLeft || 0 : 0; - const $app = $(this.$viewWrapper.node()).parent(); - $app.scrollTo(scrollToPos, 500, { axis: 'x' }); + var _a, _b, _c; + const scrollToPos = (_c = (_b = (_a = this.$viewWrapper.node()) === null || _a === void 0 ? void 0 : _a.previousSibling) === null || _b === void 0 ? void 0 : _b.offsetLeft) !== null && _c !== void 0 ? _c : 0; + scrollTo(this.$viewWrapper.node().parentElement, scrollToPos, MODE_ANIMATION_TIME); } /** * Decide if a chooser for the next view should be shown and if so, which next views are available diff --git a/dist/internal/ViewWrapper.js.map b/dist/internal/ViewWrapper.js.map index eb708b5b..134c4368 100644 --- a/dist/internal/ViewWrapper.js.map +++ b/dist/internal/ViewWrapper.js.map @@ -1 +1 @@ -{"version":3,"file":"ViewWrapper.js","sourceRoot":"","sources":["../../src/internal/ViewWrapper.ts"],"names":[],"mappings":"AAAA;;;;;;uEAMuE;AAEvE,OAAO,EAEL,cAAc,EAGd,YAAY,EAIZ,mBAAmB,EACnB,KAAK,EACL,SAAS,EAET,SAAS,GAGV,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,6CAA6C;A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AAY,GAAG,QAAQ,CAAC;AAExB,8BAAkB,GAAG,aAAa,CAAC;AAEnC,8BAAkB,GAAG,aAAa,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 2508238f..58d16258 100644 --- a/package.json +++ b/package.json @@ -52,14 +52,11 @@ }, "devDependencies": { "@types/bootstrap": "~5.0.15", - "@types/jquery.scrollto": "~1.4.28", "@types/react-highlight-words": "^0.16.1", "@types/react-router-dom": "^5.1.7", "@types/react-select": "^4.0.13" }, "dependencies": { - "jquery": "~3.5.1", - "jquery.scrollto": "~2.1.2", "react-dropzone": "^11.3.1", "react-highlight-words": "^0.17.0", "react-intersection-observer": "^8.31.1", diff --git a/src/internal/ViewWrapper.ts b/src/internal/ViewWrapper.ts index 3a1342ce..eb0dae42 100644 --- a/src/internal/ViewWrapper.ts +++ b/src/internal/ViewWrapper.ts @@ -24,9 +24,6 @@ import { IViewContext, } from 'tdp_core'; import * as d3v3 from 'd3v3'; -import * as $ from 'jquery'; -// eslint-disable-next-line import/extensions -import 'jquery.scrollto/jquery.scrollTo.js'; import { MODE_ANIMATION_TIME } from './constants'; function generateHash(desc: IPluginDesc, selection: ISelection) { @@ -46,6 +43,60 @@ const previousSiblings = (elem) => { return siblings; }; +/** + * Scrolls an element to the given horizontal target position (i.e., x-axis). + * This function is a modified version from https://medium.com/@snowleo208/how-to-create-smooth-scroll-for-your-website-ce5b198d9d94 + * + * @param element HTML element that will be scrolled + * @param target Horizontal target position + * @param duration Duration of the animation (default: 600 ms) + */ +function scrollTo(element: HTMLElement, target: number, duration = 600) { + let start = null; + const firstPosX = element.scrollLeft || 0; + let posX = 0; + + (function () { + const browser = ['ms', 'moz', 'webkit', 'o']; + + for (let x = 0, { length } = browser; x < length && !window.requestAnimationFrame; x++) { + window.requestAnimationFrame = window[`${browser[x]}RequestAnimationFrame`]; + window.cancelAnimationFrame = window[`${browser[x]}CancelAnimationFrame`] || window[`${browser[x]}CancelRequestAnimationFrame`]; + } + })(); + + function showAnimation(timestamp) { + if (!start) { + start = timestamp || new Date().getTime(); + } // get id of animation + + const elapsed = timestamp - start; + const progress = elapsed / duration; // animation duration + + // ease in function from https://github.com/component/ease/blob/master/index.js + const outQuad = function (n) { + return n * (2 - n); + }; + + const easeInPercentage = +outQuad(progress).toFixed(2); + + // if target is 0 (back to left), the position is: current pos + (current pos * percentage of duration) + // if target > 0 (not back to left), the positon is current pos + (target pos * percentage of duration) + posX = target === 0 ? firstPosX - firstPosX * easeInPercentage : firstPosX + target * easeInPercentage; + + element.scrollTo(posX, 0); + // console.log(posX, target, firstPosX, progress); + + if ((target !== 0 && posX >= firstPosX + target) || (target === 0 && posX <= 0)) { + cancelAnimationFrame(start); + posX = 0; + } else { + window.requestAnimationFrame(showAnimation); + } + } + window.requestAnimationFrame(showAnimation); +} + export class ViewWrapper extends EventHandler { static EVENT_CHOOSE_NEXT_VIEW = 'open'; @@ -337,10 +388,8 @@ export class ViewWrapper extends EventHandler { } private scrollIntoView() { - const prev = (this.$viewWrapper.node()).previousSibling; - const scrollToPos = prev ? prev.offsetLeft || 0 : 0; - const $app = $(this.$viewWrapper.node()).parent(); - ($app).scrollTo(scrollToPos, 500, { axis: 'x' }); + const scrollToPos = (this.$viewWrapper.node()?.previousSibling as HTMLDivElement)?.offsetLeft ?? 0; + scrollTo(this.$viewWrapper.node().parentElement, scrollToPos, MODE_ANIMATION_TIME); } /**