diff --git a/example/marker-popup/react/index.tsx b/example/marker-popup/react/index.tsx index c7a006e..ea69048 100644 --- a/example/marker-popup/react/index.tsx +++ b/example/marker-popup/react/index.tsx @@ -25,14 +25,18 @@ async function main() { function App() { const [location] = useState(LOCATION); const [size, setSize] = useState('normal'); - const popup = useMemo(() => ({content: () => Marker popup}), []); return ( (map = x)}> - + Marker popup, position: 'bottom'}} + /> setSize('normal'), [])} /> diff --git a/src/markers/MMapDefaultMarker/index.ts b/src/markers/MMapDefaultMarker/index.ts index 78a4c27..698a9fd 100644 --- a/src/markers/MMapDefaultMarker/index.ts +++ b/src/markers/MMapDefaultMarker/index.ts @@ -32,6 +32,13 @@ const HINT_SUBTITLE_CLASS = 'mappable--hint-subtitle'; const HINT_STABLE = 'mappable--hint__stable'; const HINT_HOVERED = 'mappable--hint__hovered'; +const NORMAL_SIZE_MARKER_HEIGHT = 59; +const NORMAL_SIZE_MARKER_WIDTH = 44; + +const SMALL_SIZE_MARKER_WIDTH = 24; + +const MICRO_SIZE_MARKER_WIDTH = 14; + const DISTANCE_BETWEEN_POPUP_AND_MARKER = 8; export type ThemesColor = {day: string; night: string}; @@ -302,19 +309,19 @@ export class MMapDefaultMarker extends mappable.MMapComplexEntity = { +type VuefyMarkerPopup = Omit; + +export const MMapDefaultMarkerVuefyOptions: CustomVuefyOptions< + MMapDefaultMarker, + Omit & {popup: VuefyMarkerPopup} +> = { props: { coordinates: {type: Object, required: true}, source: String, @@ -29,7 +34,7 @@ export const MMapDefaultMarkerVuefyOptions: CustomVuefyOptions} + popup: {type: Object as TVue.PropType} } };