More consistency between L.Evented and L.DomEvent docs. (see #3098)

This commit is contained in:
Iván Sánchez Ortega 2015-06-10 17:30:34 +02:00 committed by Vladimir Agafonkin
parent 7192bde5f9
commit 2f287ba1dd

View File

@ -5207,18 +5207,18 @@ Popups will also be automatically opened when the layer is clicked on and closed
</code></td> </code></td>
<td><code><span class="keyword">this</span></code></td> <td><code><span class="keyword">this</span></code></td>
<td>Adds a listener <code>fn</code> to the element's DOM events. <code>types</code> is a space-separated list of DOM event types to listen to. <code><span class="keyword">this</span></code> keyword inside the listener will point to <code>context</code>, or to the element if not specified.</td>
<td>Adds a listener function (<code>fn</code>) to a particular DOM event type of the element <code>el</code>. You can optionally specify the context of the listener (object the <code><span class="keyword">this</span></code> keyword will point to). You can also pass several space-separated types (e.g. <code><span class="string">'click dblclick'</span></code>).</td>
</tr> </tr>
<tr> <tr>
<td><code><b>addListener</b>( <td><code><b>on</b>(
<nobr>&lt;HTMLElement&gt; <i>el</i></nobr>, <nobr>&lt;HTMLElement&gt; <i>el</i></nobr>,
<nobr>&lt;String&gt; <i>types</i></nobr>, <nobr>&lt;Object&gt; <i>eventMap</i></nobr>,
<nobr>&lt;Function&gt; <i>fn</i></nobr>,
<nobr>&lt;Object&gt; <i>context?</i> )</nobr> <nobr>&lt;Object&gt; <i>context?</i> )</nobr>
</code></td> </code></td>
<td><code><span class="keyword">this</span></code></td> <td><code><span class="keyword">this</span></code></td>
<td>Alias for <a href="#domevent-on">DomEvent.on</a>.</td> <td>Adds a set of type/listener pairs, e.g. <code>{click: onClick, mousemove: onMouseMove}</code></td>
</tr> </tr>
<tr> <tr>
<td><code><b>off</b>( <td><code><b>off</b>(
@ -5229,7 +5229,28 @@ Popups will also be automatically opened when the layer is clicked on and closed
</code></td> </code></td>
<td><code><span class="keyword">this</span></code></td> <td><code><span class="keyword">this</span></code></td>
<td>Removes the event listener <code>fn</code> from the element, for the DOM event types in <code>types</code> (a space-separated list). Both <code>fn</code> and <code>context</code> must be equal to the function and context used previously on a <a href="#domevent-on">L.DomEvent.on</a> call.</td>
<td>Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular DOM event from the element. Note that if you passed a custom context to <code>on</code>, you must pass the same context to <code>off</code> in order to remove the listener.</td>
</tr>
<tr>
<td><code><b>off</b>(
<nobr>&lt;HTMLElement&gt; <i>el</i></nobr>,
<nobr>&lt;Object&gt; <i>eventMap</i></nobr>,
<nobr>&lt;Object&gt; <i>context?</i> )</nobr>
</code></td>
<td><code><span class="keyword">this</span></code></td>
<td>Removes a set of type/listener pairs.</code></td>
</tr> <tr>
<td><code><b>addListener</b>(
<nobr>&lt;HTMLElement&gt; <i>el</i></nobr>,
<nobr>&lt;String&gt; <i>types</i></nobr>,
<nobr>&lt;Function&gt; <i>fn</i></nobr>,
<nobr>&lt;Object&gt; <i>context?</i> )</nobr>
</code></td>
<td><code><span class="keyword">this</span></code></td>
<td>Alias to <code>on</code>.</td>
</tr> </tr>
<tr> <tr>
<td><code><b>removeListener</b>( <td><code><b>removeListener</b>(
@ -5240,7 +5261,7 @@ Popups will also be automatically opened when the layer is clicked on and closed
</code></td> </code></td>
<td><code><span class="keyword">this</span></code></td> <td><code><span class="keyword">this</span></code></td>
<td>Alias for <a href="#domevent-off">DomEvent.off</a>.</td> <td>Alias to <code>off</code>.</td>
</tr> </tr>
<tr> <tr>
<td><code><b>stopPropagation</b>( <td><code><b>stopPropagation</b>(