kopia lustrzana https://github.com/robhawkes/vizicities
				
				
				
			Picking layers should now hide with layer
							rodzic
							
								
									4b40d98029
								
							
						
					
					
						commit
						df8ce96e4c
					
				|  | @ -1093,11 +1093,11 @@ class GeoJSONWorkerLayer extends Layer { | |||
|   // Set up and re-emit interaction events
 | ||||
|   _addPicking(pickingId, properties) { | ||||
|     this._world.on('pick-click-' + pickingId, (pickingId, point2d, point3d, intersects) => { | ||||
|       this._world.emit('click', this, properties); | ||||
|       this._world.emit('click', this, properties, point2d, point3d); | ||||
|     }); | ||||
| 
 | ||||
|     this._world.on('pick-hover-' + pickingId, (pickingId, point2d, point3d, intersects) => { | ||||
|       this._world.emit('hover', this, properties); | ||||
|       this._world.emit('hover', this, properties, point2d, point3d); | ||||
|     }); | ||||
|   } | ||||
| 
 | ||||
|  |  | |||
|  | @ -126,11 +126,19 @@ class Layer extends EventEmitter { | |||
|   // TODO: Also hide any attached DOM layers
 | ||||
|   hide() { | ||||
|     this._object3D.visible = false; | ||||
| 
 | ||||
|     if (this._pickingMesh) { | ||||
|       this._pickingMesh.visible = false; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   // TODO: Also show any attached DOM layers
 | ||||
|   show() { | ||||
|     this._object3D.visible = true; | ||||
| 
 | ||||
|     if (this._pickingMesh) { | ||||
|       this._pickingMesh.visible = true; | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   // Destroys the layer and removes it from the scene and memory
 | ||||
|  |  | |||
|  | @ -349,12 +349,22 @@ class TileLayer extends Layer { | |||
| 
 | ||||
|   show() { | ||||
|     this._stop = false; | ||||
| 
 | ||||
|     if (this._tilesPicking) { | ||||
|       this._tilesPicking.visible = true; | ||||
|     } | ||||
| 
 | ||||
|     this._calculateLOD(); | ||||
|     super.show(); | ||||
|   } | ||||
| 
 | ||||
|   hide() { | ||||
|     this._stop = true; | ||||
| 
 | ||||
|     if (this._tilesPicking) { | ||||
|       this._tilesPicking.visible = false; | ||||
|     } | ||||
| 
 | ||||
|     super.hide(); | ||||
|   } | ||||
| 
 | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 Robin Hawkes
						Robin Hawkes