package ol.interaction; 
 
import jsinterop.annotations.JsType; 
import ol.Feature; 
import ol.Map; 
 
/** 
 *  
 * Handles snapping of vector features while modifying or drawing them. The 
 * features can come from a ol.source.Vector or ol.Collection Any interaction 
 * object that allows the user to interact with the features using the mouse can 
 * benefit from the snapping, as long as it is added before. 
 *  
 * The snap interaction modifies map browser event coordinate and pixel 
 * properties to force the snap to occur to any interaction that them. 
 *  
 * @author guandalini
 */ 
@JsType(isNative = true) 
public class Snap extends Interaction { 
 
  /** 
   * Add a feature to the collection of features that we may snap to. 
   *  
   * @param feature 
   */ 
  public native void addFeature(Feature feature); 
 
  /** 
   * Remove a feature from the collection of features that we may snap to. 
   *  
   * @param feature 
   */ 
  public native void removeFeature(Feature feature); 
 
  /** 
   * Get the map associated with this interaction. 
   *  
   * @return 
   */ 
  public native Map getMap(); 
 
} 
@@ -16,19 +16,17 @@
 raction;
- %0A 
+%0A
 %0Aimport 
@@ -54,17 +54,16 @@
 .JsType;
- 
 %0Aimport 
@@ -73,17 +73,16 @@
 Feature;
- 
 %0Aimport 
@@ -92,21 +92,16 @@
 Map;
- %0A 
+%0A
 %0A/**
- 
 %0A *
-  
 %0A * 
@@ -172,17 +172,16 @@
 hem. The
- 
 %0A * feat
@@ -201,16 +201,23 @@
  from a 
+%7B@link 
 ol.sourc
@@ -224,20 +224,28 @@
 e.Vector
+%7D
  or 
+%7B@link 
 ol.Colle
@@ -249,16 +249,18 @@
 llection
+%7D.
  Any int
@@ -267,17 +267,16 @@
 eraction
- 
 %0A * obje
@@ -348,17 +348,16 @@
 ouse can
- 
 %0A * bene
@@ -409,22 +409,19 @@
  before.
- 
 %0A *
-  
 %0A * The 
@@ -484,17 +484,16 @@
 nd pixel
- 
 %0A * prop
@@ -559,14 +559,11 @@
 hem.
- 
 %0A *
-  
 %0A * 
@@ -584,17 +584,16 @@
 lini%0A */
- 
 %0A@JsType
@@ -609,17 +609,16 @@
  = true)
- 
 %0Apublic 
@@ -649,27 +649,28 @@
 action %7B
- %0A %0A
+%0A%0A  
   /**
- 
 %0A
+  
    * Add
@@ -726,36 +726,37 @@
 may snap to.
- 
 %0A   
-*
   
-%0A
+*%0A 
    
+ 
 * @param fea
@@ -755,33 +755,35 @@
 aram feature
- 
 %0A
+  
    */
- 
 %0A
+  
   public nat
@@ -815,35 +815,36 @@
 re feature);
- 
+%0A
 %0A 
-%0A
   
+ 
 /**
- 
 %0A
+  
    * Remove 
@@ -905,25 +905,26 @@
 snap to.
- 
 %0A
+  
    *
+%0A
   
-%0A
    * @pa
@@ -934,25 +934,27 @@
  feature
- 
 %0A
+  
    */
- 
 %0A
+  
   public
@@ -1001,19 +1001,20 @@
 re);
- %0A %0A
+%0A%0A  
   /**
- 
 %0A
+  
    *
@@ -1063,17 +1063,18 @@
 ion.
- 
 %0A
+  
    *
+%0A
   
-%0A
    *
@@ -1086,16 +1086,22 @@
 urn 
-%0A
+map%0A 
    
+ 
 */
- 
 %0A
+  
   pu
@@ -1129,10 +1129,8 @@
 p();
- %0A %0A%7D 
+%0A%0A%7D%0A

Format source