minor updates to #793
This commit is contained in:
parent
ee99b53309
commit
fe3ef98c49
@ -3255,8 +3255,10 @@ MyClass.FOO; // 'bar'</code></pre>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 id="domutil">L.DomUtil</h2>
|
||||
<p>Utility functions to work with the DOM tree.</p>
|
||||
|
||||
<p>Utility functions to work with the DOM tree, used by Leaflet internally.</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@ -3265,29 +3267,29 @@ MyClass.FOO; // 'bar'</code></pre>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>get(<nobr><String> id</nobr>)</code></td>
|
||||
<td><code>get( <nobr><String or HTMLElement> <i>id</i> )</nobr></code></td>
|
||||
<td>HTMLElement</td>
|
||||
<td>Returns an element reference by its id.</td>
|
||||
<td>Returns an element with the given id if a string was passed, or just returns the element if it was passed directly.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>getStyle(<nobr><HTMLElement> el</nobr>, <nobr><String> style</nobr>)</code></td>
|
||||
<td>String</td>
|
||||
<td>Returns the value for a certain style attribute on an element.</td>
|
||||
<td><code>getStyle( <nobr><HTMLElement> <i>el</i></nobr>, <nobr><String> <i>style</i> )</nobr></code></td>
|
||||
<td><code>String</code></td>
|
||||
<td>Returns the value for a certain style attribute on an element, including computed values or values set through CSS.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>getViewportOffset(<nobr><HTMLElement> el</nobr>)</code></td>
|
||||
<td><code>getViewportOffset( <nobr><HTMLElement> <i>el</i> )</nobr></code></td>
|
||||
<td><a href="#point">Point</a></td>
|
||||
<td>Returns the offset to the viewport for the requested element.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>create(<nobr><String> tagName</nobr>, <nobr><String> className</nobr>, <nobr><HTMLElement> container</nobr>)</code></td>
|
||||
<td>HTMLElement</td>
|
||||
<td>Creates an element with <code>tagName</code>, sets the <code>className</code> and appends it to <code>container</code>.</td>
|
||||
<td><code>create( <nobr><String> <i>tagName</i></nobr>, <nobr><String> <i>className</i></nobr>, <nobr><HTMLElement> <i>container?</i> )</nobr></code></td>
|
||||
<td><code>HTMLElement</code></td>
|
||||
<td>Creates an element with <code>tagName</code>, sets the <code>className</code>, and optionally appends it to <code>container</code> element.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>disableTextSelection()</code></td>
|
||||
<td>-</td>
|
||||
<td>Make sure text cannot be selected, for example during dragging.</td>
|
||||
<td>Makes sure text cannot be selected, for example during dragging.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>enableTextSelection()</code></td>
|
||||
@ -3295,51 +3297,52 @@ MyClass.FOO; // 'bar'</code></pre>
|
||||
<td>Makes text selection possible again.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>hasClass(<nobr><HTMLElement> el</nobr>, <nobr><String> name</nobr>)</code></td>
|
||||
<td>Boolean</td>
|
||||
<td>Returns <code>true</code> if the element has <code>name</code> in the class attribute.</td>
|
||||
<td><code>hasClass( <nobr><HTMLElement> <i>el</i></nobr>, <nobr><String> <i>name</i> )</nobr></code></td>
|
||||
<td><code>Boolean</code></td>
|
||||
<td>Returns <code>true</code> if the element class attribute contains <code>name</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>addClass(<nobr><HTMLElement> el</nobr>, <nobr><String> name</nobr>)</code></td>
|
||||
<td><code>addClass( <nobr><HTMLElement> <i>el</i></nobr>, <nobr><String> <i>name</i> )</nobr></code></td>
|
||||
<td>-</td>
|
||||
<td>Adds <code>name</code> to the elements class attribute.</td>
|
||||
<td>Adds <code>name</code> to the element's class attribute.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>removeClass(<nobr><HTMLElement> el</nobr>, <nobr><String> name</nobr>)</code></td>
|
||||
<td><code>removeClass( <nobr><HTMLElement> <i>el</i></nobr>, <nobr><String> <i>name</i> )</nobr></code></td>
|
||||
<td>-</td>
|
||||
<td>Removes <code>name</code> from the elements class attribute.</td>
|
||||
<td>Removes <code>name</code> from the element's class attribute.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>setOpacity(<nobr><HTMLElement> el</nobr>, <nobr><Number> value</nobr>)</code></td>
|
||||
<td><code>setOpacity( <nobr><HTMLElement> <i>el</i></nobr>, <nobr><Number> <i>value</i> )</nobr></code></td>
|
||||
<td>-</td>
|
||||
<td>Set the opacity of an element.</td>
|
||||
<td>Set the opacity of an element (including old IE support). Value must be from <code>0</code> to <code>1</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>testProp(<nobr><String[]> props</nobr>)</code></td>
|
||||
<td>mixed</td>
|
||||
<td>Goes through the array and returns the first name that is a valid style name for an element. If no such name is found, it returns <code>false</code>. Useful for vendor-prefixed styles like transform.</td>
|
||||
<td><code>testProp( <nobr><String[]> <i>props</i> )</nobr></code></td>
|
||||
<td><code>String</code> or <code>false</code></td>
|
||||
<td>Goes through the array of style names and returns the first name that is a valid style name for an element. If no such name is found, it returns <code>false</code>. Useful for vendor-prefixed styles like <code>transform</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>getTranslateString(<nobr><<a href="#point">Point</a>> point</nobr>)</code></td>
|
||||
<td>String</td>
|
||||
<td>Returns a CSS translate string to move by the offset provided requested point.</td>
|
||||
<td><code>getTranslateString( <nobr><<a href="#point">Point</a>> <i>point</i> )</nobr></code></td>
|
||||
<td><code>String</code></td>
|
||||
<td>Returns a CSS transform string to move an element by the offset provided in the given point.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>getScaleString(<nobr><Number> scale</nobr>, <nobr><<a href="#point">Point</a>> origin</nobr>)</code></td>
|
||||
<td>String</td>
|
||||
<td>Returns a CSS scale string to scale an element.</td>
|
||||
<td><code>getScaleString( <nobr><Number> <i>scale</i></nobr>, <nobr><<a href="#point">Point</a>> <i>origin</i> )</nobr></code></td>
|
||||
<td><code>String</code></td>
|
||||
<td>Returns a CSS transform string to scale an element (with the given scale origin).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>setPosition(<nobr><HTMLElement> el</nobr>, <nobr><<a href="#point">Point</a>> point</nobr>, <nobr><Boolean> disable3D?</nobr>)</code></td>
|
||||
<td><code>setPosition( <nobr><HTMLElement> <i>el</i></nobr>, <nobr><<a href="#point">Point</a>> <i>point</i></nobr>, <nobr><Boolean> <i>disable3D?</i> )</nobr></code></td>
|
||||
<td>-</td>
|
||||
<td>Sets the position of an element to position <code>point</code>. Uses CSS transformations if <code>disable3D</code> is true.</td>
|
||||
<td>Sets the position of an element to coordinates specified by <code>point</code>, using CSS translate or top/left positioning depending on the browser (used by Leaflet internally to position its layers). Forces top/left positioning if <code>disable3D</code> is <code>true</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>getPosition(<nobr><HTMLElement> el</nobr>)</code></td>
|
||||
<td><code>getPosition( <nobr><HTMLElement> <i>el</i> )</nobr></code></td>
|
||||
<td><a href="#point">Point</a></td>
|
||||
<td>Returns the point for an element positioned by <code>setPosition()</code>. Note that it does not work on elements not previously positioned with <code>setPosition()</code></td>
|
||||
<td>Returns the coordinates of an element previously positioned with <code>setPosition</code>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 id="ihandler">IHandler</h2>
|
||||
<p>An interface implemented by <a href="#map-interaction-handlers">interaction handlers</a>.</p>
|
||||
|
Loading…
Reference in New Issue
Block a user