@deck.gl/layers
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -70,3 +70,3 @@ "use strict"; | ||
if (Number.isFinite(props.strokeWidth)) { | ||
_core.log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
_core.log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
@@ -73,0 +73,0 @@ overrideProps = { |
@@ -137,19 +137,12 @@ "use strict"; | ||
}, { | ||
key: "shouldUpdateState", | ||
value: function shouldUpdateState(_ref) { | ||
var changeFlags = _ref.changeFlags; | ||
return changeFlags.propsOrDataChanged || // if viewport is changed and aggregation to hexbins has not happened yet. | ||
changeFlags.viewportChanged && this.state.hexagons.length === 0; | ||
} | ||
}, { | ||
key: "updateState", | ||
value: function updateState(_ref2) { | ||
value: function updateState(_ref) { | ||
var _this = this; | ||
var oldProps = _ref2.oldProps, | ||
props = _ref2.props, | ||
changeFlags = _ref2.changeFlags; | ||
var oldProps = _ref.oldProps, | ||
props = _ref.props, | ||
changeFlags = _ref.changeFlags; | ||
var dimensionChanges = this.getDimensionChanges(oldProps, props); | ||
if (this.needsReProjectPoints(oldProps, props, changeFlags)) { | ||
if (changeFlags.dataChanged || this.needsReProjectPoints(oldProps, props)) { | ||
// project data into hexagons, and get sortedColorBins | ||
@@ -165,4 +158,4 @@ this.getHexagons(); | ||
key: "needsReProjectPoints", | ||
value: function needsReProjectPoints(oldProps, props, changeFlags) { | ||
return changeFlags.dataChanged || this.state.hexagons.length === 0 || oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator; | ||
value: function needsReProjectPoints(oldProps, props) { | ||
return oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator; | ||
} | ||
@@ -229,22 +222,19 @@ }, { | ||
value: function getHexagons() { | ||
var viewport = this.context.viewport; // layer is first initialzed with defautl viewport which could be non geospatial | ||
var hexagonAggregator = this.props.hexagonAggregator; | ||
var viewport = this.context.viewport; | ||
if (viewport.isGeospatial) { | ||
var hexagonAggregator = this.props.hexagonAggregator; | ||
var _hexagonAggregator = hexagonAggregator(this.props, viewport), | ||
hexagons = _hexagonAggregator.hexagons, | ||
hexagonVertices = _hexagonAggregator.hexagonVertices; | ||
var _hexagonAggregator = hexagonAggregator(this.props, viewport), | ||
hexagons = _hexagonAggregator.hexagons, | ||
hexagonVertices = _hexagonAggregator.hexagonVertices; | ||
this.setState({ | ||
hexagons: hexagons, | ||
hexagonVertices: hexagonVertices | ||
}); | ||
this.getSortedBins(); | ||
} | ||
this.setState({ | ||
hexagons: hexagons, | ||
hexagonVertices: hexagonVertices | ||
}); | ||
this.getSortedBins(); | ||
} | ||
}, { | ||
key: "getPickingInfo", | ||
value: function getPickingInfo(_ref3) { | ||
var info = _ref3.info; | ||
value: function getPickingInfo(_ref2) { | ||
var info = _ref2.info; | ||
var _this$state = this.state, | ||
@@ -251,0 +241,0 @@ sortedColorBins = _this$state.sortedColorBins, |
@@ -67,3 +67,3 @@ "use strict"; | ||
if (Number.isFinite(props.strokeWidth)) { | ||
_core.log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
_core.log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
@@ -70,0 +70,0 @@ overrideProps = { |
@@ -41,3 +41,3 @@ // Copyright (c) 2015 - 2017 Uber Technologies, Inc. | ||
if (Number.isFinite(props.strokeWidth)) { | ||
log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
overrideProps = { | ||
@@ -44,0 +44,0 @@ getStrokeWidth: props.strokeWidth |
@@ -103,9 +103,2 @@ // Copyright (c) 2015 - 2017 Uber Technologies, Inc. | ||
shouldUpdateState({ | ||
changeFlags | ||
}) { | ||
return changeFlags.propsOrDataChanged || // if viewport is changed and aggregation to hexbins has not happened yet. | ||
changeFlags.viewportChanged && this.state.hexagons.length === 0; | ||
} | ||
updateState({ | ||
@@ -118,3 +111,3 @@ oldProps, | ||
if (this.needsReProjectPoints(oldProps, props, changeFlags)) { | ||
if (changeFlags.dataChanged || this.needsReProjectPoints(oldProps, props)) { | ||
// project data into hexagons, and get sortedColorBins | ||
@@ -127,4 +120,4 @@ this.getHexagons(); | ||
needsReProjectPoints(oldProps, props, changeFlags) { | ||
return changeFlags.dataChanged || this.state.hexagons.length === 0 || oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator; | ||
needsReProjectPoints(oldProps, props) { | ||
return oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator; | ||
} | ||
@@ -184,17 +177,14 @@ | ||
getHexagons() { | ||
const viewport = this.context.viewport; // layer is first initialzed with defautl viewport which could be non geospatial | ||
const hexagonAggregator = this.props.hexagonAggregator; | ||
const viewport = this.context.viewport; | ||
if (viewport.isGeospatial) { | ||
const hexagonAggregator = this.props.hexagonAggregator; | ||
const _hexagonAggregator = hexagonAggregator(this.props, viewport), | ||
hexagons = _hexagonAggregator.hexagons, | ||
hexagonVertices = _hexagonAggregator.hexagonVertices; | ||
const _hexagonAggregator = hexagonAggregator(this.props, viewport), | ||
hexagons = _hexagonAggregator.hexagons, | ||
hexagonVertices = _hexagonAggregator.hexagonVertices; | ||
this.setState({ | ||
hexagons, | ||
hexagonVertices | ||
}); | ||
this.getSortedBins(); | ||
} | ||
this.setState({ | ||
hexagons, | ||
hexagonVertices | ||
}); | ||
this.getSortedBins(); | ||
} | ||
@@ -201,0 +191,0 @@ |
@@ -39,3 +39,3 @@ // Copyright (c) 2015 - 2017 Uber Technologies, Inc. | ||
if (Number.isFinite(props.strokeWidth)) { | ||
log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
overrideProps = { | ||
@@ -42,0 +42,0 @@ getStrokeWidth: props.strokeWidth |
@@ -74,3 +74,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
if (Number.isFinite(props.strokeWidth)) { | ||
log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
overrideProps = { | ||
@@ -77,0 +77,0 @@ getStrokeWidth: props.strokeWidth |
@@ -140,19 +140,12 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
}, { | ||
key: "shouldUpdateState", | ||
value: function shouldUpdateState(_ref) { | ||
var changeFlags = _ref.changeFlags; | ||
return changeFlags.propsOrDataChanged || // if viewport is changed and aggregation to hexbins has not happened yet. | ||
changeFlags.viewportChanged && this.state.hexagons.length === 0; | ||
} | ||
}, { | ||
key: "updateState", | ||
value: function updateState(_ref2) { | ||
value: function updateState(_ref) { | ||
var _this = this; | ||
var oldProps = _ref2.oldProps, | ||
props = _ref2.props, | ||
changeFlags = _ref2.changeFlags; | ||
var oldProps = _ref.oldProps, | ||
props = _ref.props, | ||
changeFlags = _ref.changeFlags; | ||
var dimensionChanges = this.getDimensionChanges(oldProps, props); | ||
if (this.needsReProjectPoints(oldProps, props, changeFlags)) { | ||
if (changeFlags.dataChanged || this.needsReProjectPoints(oldProps, props)) { | ||
// project data into hexagons, and get sortedColorBins | ||
@@ -168,4 +161,4 @@ this.getHexagons(); | ||
key: "needsReProjectPoints", | ||
value: function needsReProjectPoints(oldProps, props, changeFlags) { | ||
return changeFlags.dataChanged || this.state.hexagons.length === 0 || oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator; | ||
value: function needsReProjectPoints(oldProps, props) { | ||
return oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator; | ||
} | ||
@@ -232,22 +225,19 @@ }, { | ||
value: function getHexagons() { | ||
var viewport = this.context.viewport; // layer is first initialzed with defautl viewport which could be non geospatial | ||
var hexagonAggregator = this.props.hexagonAggregator; | ||
var viewport = this.context.viewport; | ||
if (viewport.isGeospatial) { | ||
var hexagonAggregator = this.props.hexagonAggregator; | ||
var _hexagonAggregator = hexagonAggregator(this.props, viewport), | ||
hexagons = _hexagonAggregator.hexagons, | ||
hexagonVertices = _hexagonAggregator.hexagonVertices; | ||
var _hexagonAggregator = hexagonAggregator(this.props, viewport), | ||
hexagons = _hexagonAggregator.hexagons, | ||
hexagonVertices = _hexagonAggregator.hexagonVertices; | ||
this.setState({ | ||
hexagons: hexagons, | ||
hexagonVertices: hexagonVertices | ||
}); | ||
this.getSortedBins(); | ||
} | ||
this.setState({ | ||
hexagons: hexagons, | ||
hexagonVertices: hexagonVertices | ||
}); | ||
this.getSortedBins(); | ||
} | ||
}, { | ||
key: "getPickingInfo", | ||
value: function getPickingInfo(_ref3) { | ||
var info = _ref3.info; | ||
value: function getPickingInfo(_ref2) { | ||
var info = _ref2.info; | ||
var _this$state = this.state, | ||
@@ -254,0 +244,0 @@ sortedColorBins = _this$state.sortedColorBins, |
@@ -72,3 +72,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
if (Number.isFinite(props.strokeWidth)) { | ||
log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
overrideProps = { | ||
@@ -75,0 +75,0 @@ getStrokeWidth: props.strokeWidth |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"publishConfig": { | ||
@@ -36,3 +36,3 @@ "access": "public" | ||
"dependencies": { | ||
"@deck.gl/core": "^6.2.0", | ||
"@deck.gl/core": "^6.2.1", | ||
"d3-hexbin": "^0.2.1", | ||
@@ -39,0 +39,0 @@ "earcut": "^2.0.6" |
@@ -47,3 +47,3 @@ // Copyright (c) 2015 - 2017 Uber Technologies, Inc. | ||
if (Number.isFinite(props.strokeWidth)) { | ||
log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
log.deprecated('ArcLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
overrideProps = { | ||
@@ -50,0 +50,0 @@ getStrokeWidth: props.strokeWidth |
@@ -121,14 +121,6 @@ // Copyright (c) 2015 - 2017 Uber Technologies, Inc. | ||
shouldUpdateState({changeFlags}) { | ||
return ( | ||
changeFlags.propsOrDataChanged || | ||
// if viewport is changed and aggregation to hexbins has not happened yet. | ||
(changeFlags.viewportChanged && this.state.hexagons.length === 0) | ||
); | ||
} | ||
updateState({oldProps, props, changeFlags}) { | ||
const dimensionChanges = this.getDimensionChanges(oldProps, props); | ||
if (this.needsReProjectPoints(oldProps, props, changeFlags)) { | ||
if (changeFlags.dataChanged || this.needsReProjectPoints(oldProps, props)) { | ||
// project data into hexagons, and get sortedColorBins | ||
@@ -141,8 +133,5 @@ this.getHexagons(); | ||
needsReProjectPoints(oldProps, props, changeFlags) { | ||
needsReProjectPoints(oldProps, props) { | ||
return ( | ||
changeFlags.dataChanged || | ||
this.state.hexagons.length === 0 || | ||
oldProps.radius !== props.radius || | ||
oldProps.hexagonAggregator !== props.hexagonAggregator | ||
oldProps.radius !== props.radius || oldProps.hexagonAggregator !== props.hexagonAggregator | ||
); | ||
@@ -214,10 +203,7 @@ } | ||
getHexagons() { | ||
const {hexagonAggregator} = this.props; | ||
const {viewport} = this.context; | ||
// layer is first initialzed with defautl viewport which could be non geospatial | ||
if (viewport.isGeospatial) { | ||
const {hexagonAggregator} = this.props; | ||
const {hexagons, hexagonVertices} = hexagonAggregator(this.props, viewport); | ||
this.setState({hexagons, hexagonVertices}); | ||
this.getSortedBins(); | ||
} | ||
const {hexagons, hexagonVertices} = hexagonAggregator(this.props, viewport); | ||
this.setState({hexagons, hexagonVertices}); | ||
this.getSortedBins(); | ||
} | ||
@@ -224,0 +210,0 @@ |
@@ -44,3 +44,3 @@ // Copyright (c) 2015 - 2017 Uber Technologies, Inc. | ||
if (Number.isFinite(props.strokeWidth)) { | ||
log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`'); | ||
log.deprecated('LineLayer: `strokeWidth`', '`getStrokeWidth`')(); | ||
overrideProps = { | ||
@@ -47,0 +47,0 @@ getStrokeWidth: props.strokeWidth |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
2446715
26845
Updated@deck.gl/core@^6.2.1