Skip to content

Commit bd766e9

Browse files
committed
【fix】修复不同图层设置掩膜,掩膜有相交时错乱的问题 review by xiongjj
1 parent 9d193da commit bd766e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/openlayers/core/Util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ export class Util {
515515
Util.unsetMask(todoLayers);
516516
todoLayers.forEach((layer) => {
517517
layer.classNameBak_ = layer.className_;
518-
layer.className_ = 'ol_mask_layer';
518+
layer.className_ = `ol_mask_layer_${layer.ol_uid}`;
519519
layer.clipRender = clipRender;
520520
layer.extentBak_ = layer.getExtent();
521521
layer.setExtent(clipLayer.getSource().getExtent());

test/openlayers/core/UtilSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ describe('openlayers_Util', () => {
252252
]);
253253
Util.setMask(layer, polygon);
254254
expect(layer.classNameBak_).toBe('ol-layer');
255-
expect(layer.className_).toBe('ol_mask_layer');
255+
expect(layer.className_).toContain('ol_mask_layer_');
256256
expect(layer.clipRender).not.toBeNull;
257257
expect(layer.setExtent).toHaveBeenCalled;
258258
expect(layer.changed).toHaveBeenCalled;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy