revert to old polyfill

This commit is contained in:
kwaroran
2023-05-23 19:54:56 +09:00
parent 9a7b724e9d
commit 20befc5443
2 changed files with 9 additions and 1 deletions

View File

@@ -46,6 +46,7 @@
let sideBarMode = 0; let sideBarMode = 0;
let editMode = false; let editMode = false;
let menuMode = 0; let menuMode = 0;
let dragable = navigator.maxTouchPoints <= 1
export let openGrid = () => {}; export let openGrid = () => {};
function createScratch() { function createScratch() {

View File

@@ -5,7 +5,14 @@ import { loadData } from "./ts/globalApi";
import { ReadableStream, WritableStream, TransformStream } from "web-streams-polyfill/ponyfill/es2018"; import { ReadableStream, WritableStream, TransformStream } from "web-streams-polyfill/ponyfill/es2018";
import { Buffer as BufferPolyfill } from 'buffer' import { Buffer as BufferPolyfill } from 'buffer'
import { initHotkey } from "./ts/hotkey"; import { initHotkey } from "./ts/hotkey";
import './js/DragDropTouch' import {polyfill as dragDropPolyfil} from "mobile-drag-drop";
import {scrollBehaviourDragImageTranslateOverride} from "mobile-drag-drop/scroll-behaviour";
dragDropPolyfil({
// use this to make use of the scroll behaviour
dragImageTranslateOverride: scrollBehaviourDragImageTranslateOverride,
forceApply: navigator.maxTouchPoints > 0,
});
//Polyfills //Polyfills
declare var Buffer: typeof BufferPolyfill; declare var Buffer: typeof BufferPolyfill;