More consistency between L.Evented and L.DomEvent docs. (see #3098)
This commit is contained in:
parent
7192bde5f9
commit
2f287ba1dd
@ -5207,18 +5207,18 @@ Popups will also be automatically opened when the layer is clicked on and closed
|
||||
</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>
|
||||
<td><code><b>addListener</b>(
|
||||
<td><code><b>on</b>(
|
||||
<nobr><HTMLElement> <i>el</i></nobr>,
|
||||
<nobr><String> <i>types</i></nobr>,
|
||||
<nobr><Function> <i>fn</i></nobr>,
|
||||
<nobr><Object> <i>eventMap</i></nobr>,
|
||||
<nobr><Object> <i>context?</i> )</nobr>
|
||||
</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>
|
||||
<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>
|
||||
|
||||
<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><HTMLElement> <i>el</i></nobr>,
|
||||
<nobr><Object> <i>eventMap</i></nobr>,
|
||||
<nobr><Object> <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><HTMLElement> <i>el</i></nobr>,
|
||||
<nobr><String> <i>types</i></nobr>,
|
||||
<nobr><Function> <i>fn</i></nobr>,
|
||||
<nobr><Object> <i>context?</i> )</nobr>
|
||||
</code></td>
|
||||
|
||||
<td><code><span class="keyword">this</span></code></td>
|
||||
<td>Alias to <code>on</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<td><code><b>stopPropagation</b>(
|
||||
|
Loading…
Reference in New Issue
Block a user