fix: 拾取 invalid x offset

This commit is contained in:
thinkinggis 2020-03-26 16:04:39 +08:00
parent 0d06187a2a
commit b97d0840b3
3 changed files with 4 additions and 9 deletions

View File

@ -5,14 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
## [2.1.7](https://github.com/antvis/L7/compare/v2.1.6...v2.1.7) (2020-03-26)
### Bug Fixes
* 修复颜色纹理取色问题 & 图片标注默认颜色问题 ([9d6b198](https://github.com/antvis/L7/commit/9d6b198f76b44c55ce0a094c6649c9e4130a398b))
- 修复颜色纹理取色问题 & 图片标注默认颜色问题 ([9d6b198](https://github.com/antvis/L7/commit/9d6b198f76b44c55ce0a094c6649c9e4130a398b))
## [2.1.5](https://github.com/antvis/L7/compare/v2.1.4...v2.1.5) (2020-03-20)

View File

@ -112,9 +112,9 @@ export default class PickingService implements IPickingService {
const xInDevicePixel = x * window.devicePixelRatio;
const yInDevicePixel = y * window.devicePixelRatio;
if (
xInDevicePixel > width ||
xInDevicePixel > width - 1 * window.devicePixelRatio ||
xInDevicePixel < 0 ||
yInDevicePixel > height ||
yInDevicePixel > height - 1 * window.devicePixelRatio ||
yInDevicePixel < 0
) {
return;

View File

@ -50,7 +50,7 @@ export default class HeatMapLayerDemo extends React.Component {
'#CF1D49',
],
positions: [0, 0.2, 0.4, 0.6, 0.8, 1.0],
}
},
});
scene.addLayer(layer);
});