mirror of
				https://github.com/KevinMidboe/nova-map-fields.git
				synced 2025-10-29 17:50:27 +00:00 
			
		
		
		
	Remove last & all marker buttons
This commit is contained in:
		
							
								
								
									
										2
									
								
								dist/js/field.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/js/field.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -6,8 +6,11 @@ | ||||
|         </field-map> | ||||
|  | ||||
|         <l-control position="bottomleft" > | ||||
|             <button @click="clickHandler"> | ||||
|             I am a useless button! | ||||
|             <button @click="removeLastMarker"> | ||||
|             Slett forrige | ||||
|             </button> | ||||
|             <button @click="removeAllMarkers"> | ||||
|             Slett alle | ||||
|             </button> | ||||
|         </l-control> | ||||
|     </div> | ||||
| @@ -79,13 +82,14 @@ export default { | ||||
|             this.markers.splice(-1,1); | ||||
|             this.triggerChange(); | ||||
|         }, | ||||
|         removeAllMarkers() { | ||||
|             this.markers = []; | ||||
|             this.triggerChange(); | ||||
|         }, | ||||
|         createMarker(evt) { | ||||
|             this.markers.push(evt.latlng); | ||||
|             this.triggerChange(); | ||||
|         }, | ||||
|         clickHandler() { | ||||
|             alert('clicked'); | ||||
|         }, | ||||
|     }, | ||||
|  | ||||
|     components: { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user