From 11d193de2628cafe46b89a1f629ea9db3eb28505 Mon Sep 17 00:00:00 2001 From: Cerberuser Date: Mon, 4 Jun 2018 08:54:24 +0700 Subject: [PATCH] Update cytoscape-tests.ts Added a whole set of options for startup --- types/cytoscape/cytoscape-tests.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/types/cytoscape/cytoscape-tests.ts b/types/cytoscape/cytoscape-tests.ts index 25d6151259..71e815208c 100644 --- a/types/cytoscape/cytoscape-tests.ts +++ b/types/cytoscape/cytoscape-tests.ts @@ -68,7 +68,35 @@ const cy = cytoscape({ { data: { id: 'eb', source: 'e', target: 'b' } } ] }, + + // initial viewport state: + zoom: 1, + pan: { x: 0, y: 0 }, + // interaction options: + minZoom: 1e-50, + maxZoom: 1e50, + zoomingEnabled: true, + userZoomingEnabled: true, + panningEnabled: true, + userPanningEnabled: true, + selectionType: 'single', + touchTapThreshold: 8, + desktopTapThreshold: 4, + autolock: false, + autoungrabify: false, + + // rendering options: + headless: false, + styleEnabled: true, + hideEdgesOnViewport: false, + hideLabelsOnViewport: false, + textureOnViewport: false, + motionBlur: false, + motionBlurOpacity: 0.2, + wheelSensitivity: 1, + pixelRatio: 'auto', + layout: { name: 'preset', padding: 5