cytoscape
Advanced tools
Comparing version 3.7.3 to 3.7.4
{ | ||
"build/cytoscape.umd.js": { | ||
"bundled": 905843, | ||
"minified": 334844, | ||
"gzipped": 103924 | ||
"bundled": 906789, | ||
"minified": 335087, | ||
"gzipped": 103968 | ||
}, | ||
"build/cytoscape.cjs.js": { | ||
"bundled": 834218, | ||
"minified": 355594, | ||
"gzipped": 106847 | ||
"bundled": 835136, | ||
"minified": 355837, | ||
"gzipped": 106891 | ||
}, | ||
"build/cytoscape.esm.js": { | ||
"bundled": 834045, | ||
"minified": 355451, | ||
"gzipped": 106810, | ||
"bundled": 834963, | ||
"minified": 355694, | ||
"gzipped": 106855, | ||
"treeshaked": { | ||
"rollup": { | ||
"code": 329350, | ||
"code": 329593, | ||
"import_statements": 51 | ||
}, | ||
"webpack": { | ||
"code": 331358 | ||
"code": 331601 | ||
} | ||
@@ -24,0 +24,0 @@ } |
{ | ||
"name": "cytoscape", | ||
"version": "3.7.3", | ||
"version": "3.7.4", | ||
"license": "MIT", | ||
@@ -81,4 +81,3 @@ "description": "Graph theory (a.k.a. network) library for analysis and visualisation", | ||
"dist": "cross-env NODE_ENV=production run-s build dist:*", | ||
"release": "run-s copyright dist docs", | ||
"postpublish": "run-s docs:push", | ||
"release": "run-s copyright dist", | ||
"watch": "run-s watch:fast", | ||
@@ -85,0 +84,0 @@ "watch:sync": "livereload \"build, debug\"", |
@@ -13,3 +13,3 @@ <div style="text-align: center;" align="center"><img style="width: 200px; height: 200px;" src="https://raw.githubusercontent.com/cytoscape/cytoscape.js/unstable/documentation/img/cytoscape-logo.png" width="200" height="200"></img></div> | ||
[![Download](https://img.shields.io/npm/v/cytoscape.svg?label=Download)](https://github.com/cytoscape/cytoscape.js/tree/master/dist) | ||
[![Extensions](https://img.shields.io/badge/Extensions-51-blue.svg)](http://js.cytoscape.org/#extensions) | ||
[![Extensions](https://img.shields.io/badge/Extensions-52-blue.svg)](http://js.cytoscape.org/#extensions) | ||
[![npm installs](https://img.shields.io/npm/dm/cytoscape.svg?label=npm%20installs)](https://www.npmjs.com/package/cytoscape) | ||
@@ -16,0 +16,0 @@ [![master branch tests](https://img.shields.io/travis/cytoscape/cytoscape.js/master.svg?label=master%20branch)](https://travis-ci.org/cytoscape/cytoscape.js) |
@@ -1154,2 +1154,4 @@ import * as is from '../../../is'; | ||
r.touchData.singleTouchMoved = true; | ||
freeDraggedElements( r.dragData.touchDragEles ); | ||
@@ -1233,2 +1235,8 @@ | ||
// ignore | ||
// safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...) | ||
if( cy.boxSelectionEnabled() ){ | ||
e.preventDefault(); | ||
} | ||
} else if( e.touches[1] ){ | ||
@@ -1465,5 +1473,5 @@ // ignore | ||
r.touchData.selecting = true; | ||
r.touchData.didSelect = true; | ||
select[4] = 1; | ||
r.redrawHint( 'select', true ); | ||
if( !select || select.length === 0 || select[0] === undefined ){ | ||
@@ -1479,9 +1487,11 @@ select[0] = (now[0] + now[2] + now[4]) / 3; | ||
select[4] = 1; | ||
r.touchData.selecting = true; | ||
r.redrawHint( 'select', true ); | ||
r.redraw(); | ||
// pinch to zoom | ||
} else if( capture && e.touches[1] && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled() ){ // two fingers => pinch to zoom | ||
} else if( | ||
capture && e.touches[1] | ||
&& !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom | ||
&& cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled() | ||
){ // two fingers => pinch to zoom | ||
e.preventDefault(); | ||
@@ -1586,3 +1596,6 @@ | ||
} else if( e.touches[0] ){ | ||
} else if( | ||
e.touches[0] | ||
&& !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning | ||
){ | ||
var start = r.touchData.start; | ||
@@ -1698,2 +1711,6 @@ var last = r.touchData.last; | ||
if( !r.data.bgActivePosistion ){ | ||
r.data.bgActivePosistion = math.array2point( r.touchData.startPosition ); | ||
} | ||
if( r.swipePanning ){ | ||
@@ -1716,6 +1733,2 @@ cy.panBy( { | ||
if( !r.data.bgActivePosistion ){ | ||
r.data.bgActivePosistion = math.array2point( r.touchData.startPosition ); | ||
} | ||
r.redrawHint( 'select', true ); | ||
@@ -1957,3 +1970,3 @@ | ||
r.dragData.didDrag = false; // reset for next mousedown | ||
r.dragData.didDrag = false; // reset for next touchstart | ||
@@ -1964,6 +1977,13 @@ if( e.touches.length === 0 ){ | ||
r.touchData.startGPosition = null; | ||
r.touchData.didSelect = false; | ||
} | ||
if( e.touches.length < 2 ){ | ||
if( e.touches.length === 1 ){ | ||
// the old start global pos'n may not be the same finger that remains | ||
r.touchData.startGPosition = [ e.touches[0].clientX, e.touches[0].clientY ]; | ||
} | ||
r.pinching = false; | ||
r.redrawHint( 'eles', true ); | ||
@@ -1970,0 +1990,0 @@ r.redraw(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3776013
102686