@mappedin/mappedin-js 4.0.12 → 4.0.15
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 +63 -58
- package/lib/esm/renderer/index.js +1 -1
- package/lib/mappedin.js +1 -1
- package/package.json +2 -2
|
@@ -1667,6 +1667,7 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.FloatingLabel'
|
|
|
1667
1667
|
RIGHT = "right"
|
|
1668
1668
|
}
|
|
1669
1669
|
class FloatingLabel extends BaseCollider implements ISmarterLabel {
|
|
1670
|
+
#private;
|
|
1670
1671
|
lines: number;
|
|
1671
1672
|
contextConfigured: boolean;
|
|
1672
1673
|
fillText: TDrawFn | undefined;
|
|
@@ -1846,71 +1847,75 @@ declare module '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartTooltip' {
|
|
|
1846
1847
|
import { Vector3 } from 'three';
|
|
1847
1848
|
import { TColliderStrategy } from '@mappedin/mappedin-js/renderer/internal/Mappedin.SmartCollider';
|
|
1848
1849
|
/**
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1850
|
+
*
|
|
1851
|
+
* 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.
|
|
1852
|
+
*
|
|
1853
|
+
* 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.
|
|
1854
|
+
*
|
|
1855
|
+
* You will need to specify at least `options.position` and one of `options.html` and `options.selector` OR `options.contentHtml`.
|
|
1856
|
+
*
|
|
1857
|
+
*
|
|
1858
|
+
* @class Tooltip
|
|
1859
|
+
*
|
|
1860
|
+
* @constructor
|
|
1861
|
+
* @param options {Object} Passes on options (e.g. html, text, position, map, padding, defaultAnchorType, enabledAnchorTypes, collisionRank) to MapView.Tooltip's options argument.
|
|
1862
|
+
* @param [options.html] Pass in custom html for your marker, if using this method you must also pass in a selector for your content.
|
|
1863
|
+
* @param [options.selector] Used in conjuction with the html property to select the div for repositioning
|
|
1864
|
+
* @param [options.contentHtml] Use mappedin's default tooltip styling with custom inner html content
|
|
1865
|
+
* @param [options.text] Instead of passing html pass in plain text to be displayed in the tooltip
|
|
1866
|
+
* @param [options.position] should be something you got from {{#crossLink "MapView/getPositionPolygon:method"}}{{/crossLink}} or {{#crossLink "MapView/getPositionNode:method"}}{{/crossLink}}.
|
|
1867
|
+
* @param [options.map] The map ID where the tooltip should be displayed
|
|
1868
|
+
* @param [options.defaultAnchorType] The default orientation to place the tooltip.
|
|
1869
|
+
* @param [options.padding] The distance in pixel to offset the tooltip from the anchor point.
|
|
1870
|
+
* @param [options.enabledAnchorTypes] An object used to disable certain anchor positions from being used.
|
|
1871
|
+
* @param [options.collisionRank] The rank of the object used when comparing colliders to determine which should be shown.
|
|
1872
|
+
*/
|
|
1872
1873
|
export type TSmartTooltipOptions = {
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1874
|
+
html?: string;
|
|
1875
|
+
contentHtml?: string;
|
|
1876
|
+
text?: string;
|
|
1877
|
+
position: Vector3;
|
|
1878
|
+
selector?: string;
|
|
1879
|
+
map: string;
|
|
1880
|
+
padding?: number;
|
|
1881
|
+
alwaysVisible?: boolean;
|
|
1882
|
+
collisionRank?: COLLISION_RANKING_TIERS;
|
|
1883
|
+
defaultAnchorType?: string;
|
|
1884
|
+
enabledAnchorTypes?: {
|
|
1885
|
+
[type: string]: boolean;
|
|
1886
|
+
};
|
|
1886
1887
|
};
|
|
1887
1888
|
type TTooltipStyle = {
|
|
1888
|
-
|
|
1889
|
-
|
|
1889
|
+
top?: string;
|
|
1890
|
+
left?: string;
|
|
1890
1891
|
};
|
|
1891
1892
|
export type TOOLTIP_ANCHOR = {
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1893
|
+
top?: boolean;
|
|
1894
|
+
left?: boolean;
|
|
1895
|
+
topLeft?: boolean;
|
|
1896
|
+
right?: boolean;
|
|
1897
|
+
topRight?: boolean;
|
|
1898
|
+
bottom?: boolean;
|
|
1899
|
+
bottomLeft?: boolean;
|
|
1900
|
+
bottomRight?: boolean;
|
|
1900
1901
|
};
|
|
1901
1902
|
class SmartTooltip extends HTMLCollider implements IHTMLCollider {
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1903
|
+
#private;
|
|
1904
|
+
className: string;
|
|
1905
|
+
_el: Element | null;
|
|
1906
|
+
style: TTooltipStyle;
|
|
1907
|
+
constructor(options: TSmartTooltipOptions);
|
|
1908
|
+
updateClassName: (className: any) => void;
|
|
1909
|
+
get strategies(): TColliderStrategy[];
|
|
1910
|
+
colliderDidMount(): void;
|
|
1911
|
+
/**
|
|
1912
|
+
* @internal
|
|
1913
|
+
*/
|
|
1914
|
+
updateDimensionsImmediately(): void;
|
|
1915
|
+
setAction(action: any): void;
|
|
1916
|
+
colliderDidNotFindAHome(): void;
|
|
1917
|
+
colliderDidGoOffscreen(): void;
|
|
1918
|
+
colliderDidUpdateVisiblity(): void;
|
|
1914
1919
|
}
|
|
1915
1920
|
export default SmartTooltip;
|
|
1916
1921
|
}
|