-
Notifications
You must be signed in to change notification settings - Fork 660
chore: 通过ID 移除图层&fillimage 镜像问题 #2736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
35158bd
feat: 相对坐标模式
lzxue 0197b48
feat: 支持相对坐标系
lzxue a8d8062
chore: ci node 版本20
lzxue e93e395
fix: code formatting issues for CI
lzxue 2b70b0c
fix: resolve GL native bindings and Jest memory issues
lzxue 35a77ce
chore: 更新单测配置
lzxue b3e6622
fix: prettier error
lzxue d0bf99c
chore: lint error
lzxue c806cdf
chore: lint error
lzxue c0a72a8
test: update integration test snapshots
lzxue 3a3b850
chore: 添加变更集
lzxue 3826deb
feat: add changeset for relative coordinate system support
lzxue b27b676
chore: 更新变更集
lzxue 850fb94
chore: 更新变更集
lzxue eec37b9
chore: 设置私有
lzxue 1b04c32
Merge branch 'master' of https://github.com/antvis/L7 into feat_zoom_22
lzxue cc65c5f
chore: 设置为私有
lzxue 7c5fce9
chore: 优化layer 移除方法
lzxue 808dff4
fix: 修复 fillImage 点图层图片镜像翻转问题
lzxue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| '@antv/l7-component': patch | ||
| '@antv/l7-layers': patch | ||
| '@antv/l7-source': patch | ||
| '@antv/l7-core': patch | ||
| '@antv/l7-maps': patch | ||
| '@antv/l7-map': patch | ||
| '@antv/l7': patch | ||
| --- | ||
|
|
||
| 相对坐标系支持 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,11 +104,19 @@ export default class LayerService extends EventEmitter<LayerServiceEvent> implem | |
| } | ||
|
|
||
| public async remove(layer: ILayer, parentLayer?: ILayer): Promise<void> { | ||
| // Tip: layer.layerChildren 当 layer 存在子图层的情况 | ||
| if (parentLayer) { | ||
| parentLayer.layerChildren = parentLayer.layerChildren.filter((item) => item !== layer); | ||
| if (!parentLayer.layerChildren) { | ||
| parentLayer.layerChildren = []; | ||
| } | ||
| const index = parentLayer.layerChildren.findIndex((item) => item.id === layer.id); | ||
| if (index > -1) { | ||
| parentLayer.layerChildren.splice(index, 1); | ||
| } | ||
| } else { | ||
| this.layers = this.layers.filter((item) => item !== layer); | ||
| const index = this.layers.findIndex((item) => item.id === layer.id); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 确保 |
||
| if (index > -1) { | ||
| this.layers.splice(index, 1); | ||
| } | ||
| } | ||
| layer.destroy(); | ||
| this.reRender(); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确保
parentLayer.layerChildren存在以避免潜在的undefined错误。