@mappedin/mappedin-js 4.0.12 → 4.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/renderer/index.d.ts +62 -58
- package/lib/esm/renderer/index.js +1 -1
- package/lib/mappedin.js +1 -1
- package/package.json +2 -2
|
@@ -1846,71 +1846,75 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip' {
|
|
|
1846
1846
|
import { Vector3 } from 'three';
|
|
1847
1847
|
import { TColliderStrategy } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
|
|
1848
1848
|
/**
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1849
|
+
*
|
|
1850
|
+
* A Tooltip is an html element that attempts to orient itself around an anchor in 3D space. It will always maintain the same size on the screen, but will attempt to change its orientation based on other colliders in the scene.
|
|
1851
|
+
*
|
|
1852
|
+
* Make your own and add it directly to the map with {{#crossLink "MapView/createTooltip:method"}}{{/crossLink}}, or use the constructor and add it when you want.
|
|
1853
|
+
*
|
|
1854
|
+
* You will need to specify at least `options.position` and one of `options.html` and `options.selector` OR `options.contentHtml`.
|
|
1855
|
+
*
|
|
1856
|
+
*
|
|
1857
|
+
* @class Tooltip
|
|
1858
|
+
*
|
|
1859
|
+
* @constructor
|
|
1860
|
+
* @param options {Object} Passes on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument.
|
|
1861
|
+
* @param [options.html] Pass in custom html for your marker, if using this method you must also pass in a selector for your content.
|
|
1862
|
+
* @param [options.selector] Used in conjuction with the html property to select the div for repositioning
|
|
1863
|
+
* @param [options.contentHtml] Use mappedin's default tooltip styling with custom inner html content
|
|
1864
|
+
* @param [options.text] Instead of passing html pass in plain text to be displayed in the tooltip
|
|
1865
|
+
* @param [options.position] should be something you got from {{#crossLink "MapView/getPositionPolygon:method"}}{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}.
|
|
1866
|
+
* @param [options.map] The map ID where the tooltip should be displayed
|
|
1867
|
+
* @param [options.defaultAnchorType] The default orientation to place the tooltip.
|
|
1868
|
+
* @param [options.padding] The distance in pixel to offset the tooltip from the anchor point.
|
|
1869
|
+
* @param [options.enabledAnchorTypes] An object used to disable certain anchor positions from being used.
|
|
1870
|
+
* @param [options.collisionRank] The rank of the object used when comparing colliders to determine which should be shown.
|
|
1871
|
+
*/
|
|
1872
1872
|
export type TSmartTooltipOptions = {
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1873
|
+
html?: string;
|
|
1874
|
+
contentHtml?: string;
|
|
1875
|
+
text?: string;
|
|
1876
|
+
position: Vector3;
|
|
1877
|
+
selector?: string;
|
|
1878
|
+
map: string;
|
|
1879
|
+
padding?: number;
|
|
1880
|
+
alwaysVisible?: boolean;
|
|
1881
|
+
collisionRank?: COLLISION_RANKING_TIERS;
|
|
1882
|
+
defaultAnchorType?: string;
|
|
1883
|
+
enabledAnchorTypes?: {
|
|
1884
|
+
[type: string]: boolean;
|
|
1885
|
+
};
|
|
1886
1886
|
};
|
|
1887
1887
|
type TTooltipStyle = {
|
|
1888
|
-
|
|
1889
|
-
|
|
1888
|
+
top?: string;
|
|
1889
|
+
left?: string;
|
|
1890
1890
|
};
|
|
1891
1891
|
export type TOOLTIP_ANCHOR = {
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1892
|
+
top?: boolean;
|
|
1893
|
+
left?: boolean;
|
|
1894
|
+
topLeft?: boolean;
|
|
1895
|
+
right?: boolean;
|
|
1896
|
+
topRight?: boolean;
|
|
1897
|
+
bottom?: boolean;
|
|
1898
|
+
bottomLeft?: boolean;
|
|
1899
|
+
bottomRight?: boolean;
|
|
1900
1900
|
};
|
|
1901
1901
|
class SmartTooltip extends HTMLCollider implements IHTMLCollider {
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1902
|
+
#private;
|
|
1903
|
+
className: string;
|
|
1904
|
+
_el: Element | null;
|
|
1905
|
+
style: TTooltipStyle;
|
|
1906
|
+
constructor(options: TSmartTooltipOptions);
|
|
1907
|
+
updateClassName: (className: any) => void;
|
|
1908
|
+
get strategies(): TColliderStrategy[];
|
|
1909
|
+
colliderDidMount(): void;
|
|
1910
|
+
/**
|
|
1911
|
+
* @internal
|
|
1912
|
+
*/
|
|
1913
|
+
updateDimensionsImmediately(): void;
|
|
1914
|
+
setAction(action: any): void;
|
|
1915
|
+
colliderDidNotFindAHome(): void;
|
|
1916
|
+
colliderDidGoOffscreen(): void;
|
|
1917
|
+
colliderDidUpdateVisiblity(): void;
|
|
1914
1918
|
}
|
|
1915
1919
|
export default SmartTooltip;
|
|
1916
1920
|
}
|