From 2082cb49d89603e9e865a7934f3848ad6d16f028 Mon Sep 17 00:00:00 2001 From: Adam Krogh Date: Thu, 10 Nov 2016 08:48:34 -0700 Subject: [PATCH] Released a new version. --- bower.json | 2 +- dist/snazzy-info-window.min.css.map | 2 +- dist/snazzy-info-window.min.js.map | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index 99f17d5..d866855 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "snazzy-info-window", "description": "Customizable info windows using the Google Maps JavaScript API.", - "version": "0.0.1", + "version": "1.0.0", "homepage": "https://github.com/atmist/snazzy-info-window", "repository": { "url": "https://github.com/atmist/snazzy-info-window.git", diff --git a/dist/snazzy-info-window.min.css.map b/dist/snazzy-info-window.min.css.map index deee298..195e71b 100644 --- a/dist/snazzy-info-window.min.css.map +++ b/dist/snazzy-info-window.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["snazzy-info-window.scss","snazzy-info-window.css","_settings.scss"],"names":[],"mappings":"AAmCA;EACI,mBAAmB;EACnB,YAAY,EAMf;EARD;;IAMQ,uBAAuB,EAC1B;;ACnCL;EDuCI,qBAAc;EAAd,qBAAc;EAAd,cAAc;EACd,mBAAmB;EACnB,0BAAoB;MAApB,uBAAoB;UAApB,oBAAoB;EACpB,gBE9CkB;EF+ClB,gBAAgB,EACnB;;AAGD;EACI,6BAAuB;EAAvB,8BAAuB;MAAvB,2BAAuB;UAAvB,uBAAuB;EACvB,kBAAa;EACb,iBAAqC;EACrC,0CAAoB;UAApB,kCAAoB,EACvB;;AAGD;EACI,6BAA+B;EAA/B,+BAA+B;MAA/B,mCAA+B;UAA/B,+BAA+B;EAC/B,gBAAqC;EACrC,iBAAqC;EACrC,sCAAoB;UAApB,8BAAoB,EACvB;;AAGD;EACI,kBAAqC;EACrC,mBAAc;EACd,0CAAoB;UAApB,kCAAoB,EACvB;;AAGD;EACI,+BAA4B;EAA5B,+BAA4B;MAA5B,gCAA4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LoB,EFwLvB;;ACrFL;ED+FI,mBAAmB;EACnB,+BAA4C;EAC5C,WAAW,EACd;;AC7FD;EDkGI,mBAAmB;EACnB,+BAA4C;EAC5C,WAAW,EAKd;EARsB;IAMf,mBAAgC,EACnC;;AAGL;;EACI,UAAU;EACV,sCAAoB;UAApB,8BAAoB,EACvB;;AAED;;EACI,SAAS;EACT,sCAAoB;UAApB,8BAAoB,EACvB;;AAGD;EACI,iBAAiB,EACpB;;AAED;EACI,UAAU;EACV,uBErPqB,EFsPxB;;AAED;EACI,uBE/PyB,EFqQ5B;EAPD;IAIQ,UE7PgB;IF8PhB,mBArC0B,EAsC7B;;AAKL;EACI,cAAc,EACjB;;AAED;EACI,OAAO;EACP,0BEzQqB,EF0QxB;;AAED;EACI,0BEnRyB,EFyR5B;EAPD;IAIQ,aEjRgB;IFkRhB,gBAzD0B,EA0D7B;;AAIL;EACI,gBAAgB,EACnB;;AAED;EACI,SAAS;EACT,wBE5RqB,EF6RxB;;AAED;EACI,wBEtSyB,EF4S5B;EAPD;IAIQ,WEpSgB;IFqShB,kBA5E0B,EA6E7B;;AAIL;EACI,eAAe,EAClB;;AAED;EACI,QAAQ;EACR,yBE/SqB,EFgTxB;;AAED;EACI,yBEzTyB,EF+T5B;EAPD;IAIQ,YEvTgB;IFwThB,iBA/F0B,EAgG7B","file":"snazzy-info-window.min.css","sourcesContent":["// Snazzy Info Window\n@import '_settings';\n\n\n\n//////////////////////////////\n// 0. Variables\n//////////////////////////////\n\n// Snazzy Info Window settings\n$si-pre: si;\n\n// Default marker\n$si-default-marker-width: 22px;\n$si-default-marker-height: 40px;\n$si-default-marker-anchor-x: 11px;\n$si-default-marker-anchor-y: 40px;\n$si-default-marker-margin: 0;\n\n// Math variable\n$si-root-2: 1.41421356237;\n$si-inverse-root-2: 0.7071067811865474;\n\n// Pointer settings\n$si-rotation: -45deg;\n$si-rotated-shadow-h: $si-inverse-root-2 * ($si-shadow-h - $si-shadow-v); // Only applies to a -45deg rotation\n$si-rotated-shadow-v: $si-inverse-root-2 * ($si-shadow-h + $si-shadow-v); // Only applies to a -45deg rotation\n\n\n\n//////////////////////////////\n// 1. Wrapper Styles\n//////////////////////////////\n\n// Infowindow wrapper\n.#{$si-pre}-float-wrapper {\n position: absolute;\n width: 100%;\n\n &,\n * {\n box-sizing: border-box;\n }\n}\n\n[class*='#{$si-pre}-wrapper'] {\n display: flex;\n position: absolute;\n align-items: center;\n font-size: $si-font-size;\n cursor: default;\n}\n\n// Top-positioned infowindow\n.#{$si-pre}-wrapper-top {\n flex-direction: column;\n margin-top: -$si-default-marker-anchor-y - $si-default-marker-margin;\n margin-left: $si-default-marker-width / 2 - $si-default-marker-anchor-x;\n transform: translate(-50%, -100%);\n}\n\n// Bottom-positioned infowindow\n.#{$si-pre}-wrapper-bottom {\n flex-direction: column-reverse;\n margin-top: $si-default-marker-height - $si-default-marker-anchor-y + $si-default-marker-margin;\n margin-left: $si-default-marker-width / 2 - $si-default-marker-anchor-x;\n transform: translate(-50%, 0);\n}\n\n// Left-positioned infowindow\n.#{$si-pre}-wrapper-left {\n margin-top: $si-default-marker-height / 2 - $si-default-marker-anchor-y;\n margin-left: -$si-default-marker-anchor-x - $si-default-marker-margin;\n transform: translate(-100%, -50%);\n}\n\n// Right-positioned infowindow\n.#{$si-pre}-wrapper-right {\n flex-direction: row-reverse;\n margin-top: $si-default-marker-height / 2 - $si-default-marker-anchor-y;\n margin-left: $si-default-marker-width - $si-default-marker-anchor-x + $si-default-marker-margin;\n transform: translate(0, -50%);\n}\n\n\n\n//////////////////////////////\n// 2. Infowindow Shadow\n//////////////////////////////\n\n// Shadow wrapper\n[class*='#{$si-pre}-shadow-wrapper'] {\n display: flex;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: $si-shadow-opacity;\n z-index: 1;\n}\n\n// Shadow position\n.#{$si-pre}-shadow-wrapper-top,\n.#{$si-pre}-shadow-wrapper-bottom {\n flex-direction: column;\n}\n\n.#{$si-pre}-shadow-pointer-bottom,\n.#{$si-pre}-shadow-pointer-right {\n order: -1;\n}\n\n// Box shadow\n.#{$si-pre}-shadow-frame {\n box-shadow: $si-shadow-h $si-shadow-v $si-shadow-blur $si-shadow-spread $si-shadow-color;\n}\n\n// Pointer shadow\n[class*='#{$si-pre}-shadow-pointer'] {\n position: relative;\n width: $si-pointer-length;\n height: $si-pointer-length;\n margin: auto;\n}\n\n[class*='#{$si-pre}-shadow-inner-pointer'] {\n position: absolute;\n width: 141%;\n height: 141%;\n box-shadow: $si-rotated-shadow-h $si-rotated-shadow-v $si-shadow-blur $si-shadow-spread $si-shadow-color;\n}\n\n\n.#{$si-pre}-shadow-inner-pointer-top {\n left: 50%;\n transform: translate(-50%, -50%) rotate($si-rotation);\n}\n\n.#{$si-pre}-shadow-inner-pointer-bottom {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%) rotate($si-rotation);\n}\n\n.#{$si-pre}-shadow-inner-pointer-left {\n top: 50%;\n transform: translate(-50%, -50%) rotate($si-rotation);\n}\n\n.#{$si-pre}-shadow-inner-pointer-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%) rotate($si-rotation);\n}\n\n\n\n//////////////////////////////\n// 3. Content Styles\n//////////////////////////////\n\n// Content styles\n.#{$si-pre}-frame {\n position: relative;\n flex: 1 1 auto;\n border-radius: $si-border-radius;\n overflow: hidden;\n z-index: 2;\n}\n\n.#{$si-pre}-content-wrapper {\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n padding: $si-content-padding;\n background-color: $si-content-bg;\n\n .#{$si-pre}-has-border & {\n border: $si-border-width solid $si-border-color;\n }\n}\n\n.#{$si-pre}-content {\n overflow: auto;\n}\n\n\n\n//////////////////////////////\n// 4. Close Button\n//////////////////////////////\n\n.#{$si-pre}-close-button {\n position: absolute;\n top: 0;\n right: 0;\n border: 0;\n outline: none;\n background-color: transparent;\n color: inherit;\n font-family: Arial, Baskerville, monospace;\n font-size: $si-close-font-size;\n cursor: pointer;\n opacity: $si-close-opacity;\n appearance: none;\n\n &:hover,\n &:focus {\n opacity: $si-close-hover-opacity;\n }\n}\n\n\n\n//////////////////////////////\n// 5. Pointer Styles\n//////////////////////////////\n\n[class*='#{$si-pre}-pointer-border'] {\n position: absolute;\n border: $si-pointer-length solid transparent;\n z-index: 3;\n}\n\n$si-triangle-difference: min(round($si-border-width * ($si-root-2 - 1)), $si-pointer-length);\n\n[class*='#{$si-pre}-pointer-bg'] {\n position: relative;\n border: $si-pointer-length solid transparent;\n z-index: 4;\n\n .#{$si-pre}-has-border & {\n border-width: $si-pointer-length - $si-triangle-difference;\n }\n}\n\n.#{$si-pre}-pointer-border-top,\n.#{$si-pre}-pointer-border-bottom {\n left: 50%;\n transform: translate(-50%, 0);\n}\n\n.#{$si-pre}-pointer-border-left,\n.#{$si-pre}-pointer-border-right {\n top: 50%;\n transform: translate(0, -50%);\n}\n\n// Top pointer poisitioning\n.#{$si-pre}-pointer-top {\n border-bottom: 0;\n}\n\n.#{$si-pre}-pointer-border-top {\n bottom: 0;\n border-top-color: $si-border-color;\n}\n\n.#{$si-pre}-pointer-bg-top {\n border-top-color: $si-content-bg;\n\n .#{$si-pre}-has-border & {\n top: -$si-border-width;\n margin-bottom: $si-triangle-difference;\n }\n}\n\n\n// Bottom pointer positioning\n.#{$si-pre}-pointer-bottom {\n border-top: 0;\n}\n\n.#{$si-pre}-pointer-border-bottom {\n top: 0;\n border-bottom-color: $si-border-color;\n}\n\n.#{$si-pre}-pointer-bg-bottom {\n border-bottom-color: $si-content-bg;\n\n .#{$si-pre}-has-border & {\n bottom: -$si-border-width;\n margin-top: $si-triangle-difference;\n }\n}\n\n// Left pointer positioning\n.#{$si-pre}-pointer-left {\n border-right: 0;\n}\n\n.#{$si-pre}-pointer-border-left {\n right: 0;\n border-left-color: $si-border-color;\n}\n\n.#{$si-pre}-pointer-bg-left {\n border-left-color: $si-content-bg;\n\n .#{$si-pre}-has-border & {\n left: -$si-border-width;\n margin-right: $si-triangle-difference;\n }\n}\n\n// Right pointer positioning\n.#{$si-pre}-pointer-right {\n border-left: 0;\n}\n\n.#{$si-pre}-pointer-border-right {\n left: 0;\n border-right-color: $si-border-color;\n}\n\n.#{$si-pre}-pointer-bg-right {\n border-right-color: $si-content-bg;\n\n .#{$si-pre}-has-border & {\n right: -$si-border-width;\n margin-left: $si-triangle-difference;\n }\n}\n",".si-float-wrapper {\n position: absolute;\n width: 100%; }\n .si-float-wrapper,\n .si-float-wrapper * {\n box-sizing: border-box; }\n\n[class*='si-wrapper'] {\n display: flex;\n position: absolute;\n align-items: center;\n font-size: 14px;\n cursor: default; }\n\n.si-wrapper-top {\n flex-direction: column;\n margin-top: -40px;\n margin-left: 0px;\n transform: translate(-50%, -100%); }\n\n.si-wrapper-bottom {\n flex-direction: column-reverse;\n margin-top: 0px;\n margin-left: 0px;\n transform: translate(-50%, 0); }\n\n.si-wrapper-left {\n margin-top: -20px;\n margin-left: -11px;\n transform: translate(-100%, -50%); }\n\n.si-wrapper-right {\n flex-direction: row-reverse;\n margin-top: -20px;\n margin-left: 11px;\n transform: translate(0, -50%); }\n\n[class*='si-shadow-wrapper'] {\n display: flex;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.29804;\n z-index: 1; }\n\n.si-shadow-wrapper-top,\n.si-shadow-wrapper-bottom {\n flex-direction: column; }\n\n.si-shadow-pointer-bottom,\n.si-shadow-pointer-right {\n order: -1; }\n\n.si-shadow-frame {\n box-shadow: 0 1px 3px 0 #000; }\n\n[class*='si-shadow-pointer'] {\n position: relative;\n width: 15px;\n height: 15px;\n margin: auto; }\n\n[class*='si-shadow-inner-pointer'] {\n position: absolute;\n width: 141%;\n height: 141%;\n box-shadow: -0.70711px 0.70711px 3px 0 #000; }\n\n.si-shadow-inner-pointer-top {\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg); }\n\n.si-shadow-inner-pointer-bottom {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%) rotate(-45deg); }\n\n.si-shadow-inner-pointer-left {\n top: 50%;\n transform: translate(-50%, -50%) rotate(-45deg); }\n\n.si-shadow-inner-pointer-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%) rotate(-45deg); }\n\n.si-frame {\n position: relative;\n flex: 1 1 auto;\n border-radius: 3px;\n overflow: hidden;\n z-index: 2; }\n\n.si-content-wrapper {\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n padding: 30px;\n background-color: #fff; }\n .si-has-border .si-content-wrapper {\n border: 1px solid #bbb; }\n\n.si-content {\n overflow: auto; }\n\n.si-close-button {\n position: absolute;\n top: 0;\n right: 0;\n border: 0;\n outline: none;\n background-color: transparent;\n color: inherit;\n font-family: Arial, Baskerville, monospace;\n font-size: 24px;\n cursor: pointer;\n opacity: 0.5;\n appearance: none; }\n .si-close-button:hover, .si-close-button:focus {\n opacity: 0.7; }\n\n[class*='si-pointer-border'] {\n position: absolute;\n border: 15px solid transparent;\n z-index: 3; }\n\n[class*='si-pointer-bg'] {\n position: relative;\n border: 15px solid transparent;\n z-index: 4; }\n .si-has-border [class*='si-pointer-bg'] {\n border-width: 15px; }\n\n.si-pointer-border-top,\n.si-pointer-border-bottom {\n left: 50%;\n transform: translate(-50%, 0); }\n\n.si-pointer-border-left,\n.si-pointer-border-right {\n top: 50%;\n transform: translate(0, -50%); }\n\n.si-pointer-top {\n border-bottom: 0; }\n\n.si-pointer-border-top {\n bottom: 0;\n border-top-color: #bbb; }\n\n.si-pointer-bg-top {\n border-top-color: #fff; }\n .si-has-border .si-pointer-bg-top {\n top: -1px;\n margin-bottom: 0px; }\n\n.si-pointer-bottom {\n border-top: 0; }\n\n.si-pointer-border-bottom {\n top: 0;\n border-bottom-color: #bbb; }\n\n.si-pointer-bg-bottom {\n border-bottom-color: #fff; }\n .si-has-border .si-pointer-bg-bottom {\n bottom: -1px;\n margin-top: 0px; }\n\n.si-pointer-left {\n border-right: 0; }\n\n.si-pointer-border-left {\n right: 0;\n border-left-color: #bbb; }\n\n.si-pointer-bg-left {\n border-left-color: #fff; }\n .si-has-border .si-pointer-bg-left {\n left: -1px;\n margin-right: 0px; }\n\n.si-pointer-right {\n border-left: 0; }\n\n.si-pointer-border-right {\n left: 0;\n border-right-color: #bbb; }\n\n.si-pointer-bg-right {\n border-right-color: #fff; }\n .si-has-border .si-pointer-bg-right {\n right: -1px;\n margin-left: 0px; }\n","// Content\n$si-content-bg: \t#fff !default;\t\t\t\t\t// Background color of the infowindow\n$si-content-padding: \t30px !default;\t\t\t\t\t// Padding of the infowindow\n$si-font-size:\t\t\t\t14px !default;\t\t\t\t\t// Font size of the infowindow content\n\n// Border\n$si-border-width: \t\t\t1px !default;\t\t\t\t\t// Width of the border\n$si-border-color: \t\t\t#bbb !default;\t\t\t\t\t// Color of the border\n$si-border-radius: \t3px !default;\t\t\t\t\t// Border radius of the infowindow\n\n// Pointer\n$si-pointer-length: \t15px !default;\t\t\t\t\t// Length of the pointer, from the edge of the infowindow to the tip\n\n// Shadow\n$si-shadow-h: \t0 !default;\t\t\t\t\t\t// Shadow horizontal offset\n$si-shadow-v: \t1px !default;\t\t\t\t\t// Shadow vertical offset\n$si-shadow-blur: \t3px !default;\t\t\t\t\t// Shadow blur radius\n$si-shadow-spread: \t0 !default;\t\t\t\t\t\t// Shadow spread radius\n$si-shadow-color: \t#000 !default;\t\t\t\t\t// Shadow color\n$si-shadow-opacity: \t0.298039 !default;\t\t\t\t// Shadow opacity\n\n// Close button\n$si-close-font-size:\t\t24px !default;\t\t\t\t\t// Size of the close button text\n$si-close-opacity:\t\t\t0.5 !default;\t\t\t\t\t// Initial opacity of the close button\n$si-close-hover-opacity:\t0.7 !default;\t\t\t\t\t// Hover and focus opacity of the close button\n"]} \ No newline at end of file +{"version":3,"sources":["snazzy-info-window.scss","snazzy-info-window.css","_settings.scss"],"names":[],"mappings":"AAmCA;EACI,mBAAmB;EACnB,YAAY,EAMf;EARD;;IAMQ,uBAAuB,EAC1B;;ACnCL;EDuCI,qBAAc;EAAd,qBAA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xB;;AAED;EACI,yBEzTyB,EF+T5B;EAPD;IAIQ,YEvTgB;IFwThB,iBA/F0B,EAgG7B","file":"snazzy-info-window.min.css","sourcesContent":["// Snazzy Info Window\r\n@import '_settings';\r\n\r\n\r\n\r\n//////////////////////////////\r\n// 0. Variables\r\n//////////////////////////////\r\n\r\n// Snazzy Info Window settings\r\n$si-pre: si;\r\n\r\n// Default marker\r\n$si-default-marker-width: 22px;\r\n$si-default-marker-height: 40px;\r\n$si-default-marker-anchor-x: 11px;\r\n$si-default-marker-anchor-y: 40px;\r\n$si-default-marker-margin: 0;\r\n\r\n// Math variable\r\n$si-root-2: 1.41421356237;\r\n$si-inverse-root-2: 0.7071067811865474;\r\n\r\n// Pointer settings\r\n$si-rotation: -45deg;\r\n$si-rotated-shadow-h: $si-inverse-root-2 * ($si-shadow-h - $si-shadow-v); // Only applies to a -45deg rotation\r\n$si-rotated-shadow-v: $si-inverse-root-2 * ($si-shadow-h + $si-shadow-v); // Only applies to a -45deg rotation\r\n\r\n\r\n\r\n//////////////////////////////\r\n// 1. Wrapper Styles\r\n//////////////////////////////\r\n\r\n// Infowindow wrapper\r\n.#{$si-pre}-float-wrapper {\r\n position: absolute;\r\n width: 100%;\r\n\r\n &,\r\n * {\r\n box-sizing: border-box;\r\n }\r\n}\r\n\r\n[class*='#{$si-pre}-wrapper'] {\r\n display: flex;\r\n position: absolute;\r\n align-items: center;\r\n font-size: $si-font-size;\r\n cursor: default;\r\n}\r\n\r\n// Top-positioned infowindow\r\n.#{$si-pre}-wrapper-top {\r\n flex-direction: column;\r\n margin-top: -$si-default-marker-anchor-y - $si-default-marker-margin;\r\n margin-left: $si-default-marker-width / 2 - $si-default-marker-anchor-x;\r\n transform: translate(-50%, -100%);\r\n}\r\n\r\n// Bottom-positioned infowindow\r\n.#{$si-pre}-wrapper-bottom {\r\n flex-direction: column-reverse;\r\n margin-top: $si-default-marker-height - $si-default-marker-anchor-y + $si-default-marker-margin;\r\n margin-left: $si-default-marker-width / 2 - $si-default-marker-anchor-x;\r\n transform: translate(-50%, 0);\r\n}\r\n\r\n// Left-positioned infowindow\r\n.#{$si-pre}-wrapper-left {\r\n margin-top: $si-default-marker-height / 2 - $si-default-marker-anchor-y;\r\n margin-left: -$si-default-marker-anchor-x - $si-default-marker-margin;\r\n transform: translate(-100%, -50%);\r\n}\r\n\r\n// Right-positioned infowindow\r\n.#{$si-pre}-wrapper-right {\r\n flex-direction: row-reverse;\r\n margin-top: $si-default-marker-height / 2 - $si-default-marker-anchor-y;\r\n margin-left: $si-default-marker-width - $si-default-marker-anchor-x + $si-default-marker-margin;\r\n transform: translate(0, -50%);\r\n}\r\n\r\n\r\n\r\n//////////////////////////////\r\n// 2. Infowindow Shadow\r\n//////////////////////////////\r\n\r\n// Shadow wrapper\r\n[class*='#{$si-pre}-shadow-wrapper'] {\r\n display: flex;\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n opacity: $si-shadow-opacity;\r\n z-index: 1;\r\n}\r\n\r\n// Shadow position\r\n.#{$si-pre}-shadow-wrapper-top,\r\n.#{$si-pre}-shadow-wrapper-bottom {\r\n flex-direction: column;\r\n}\r\n\r\n.#{$si-pre}-shadow-pointer-bottom,\r\n.#{$si-pre}-shadow-pointer-right {\r\n order: -1;\r\n}\r\n\r\n// Box shadow\r\n.#{$si-pre}-shadow-frame {\r\n box-shadow: $si-shadow-h $si-shadow-v $si-shadow-blur $si-shadow-spread $si-shadow-color;\r\n}\r\n\r\n// Pointer shadow\r\n[class*='#{$si-pre}-shadow-pointer'] {\r\n position: relative;\r\n width: $si-pointer-length;\r\n height: $si-pointer-length;\r\n margin: auto;\r\n}\r\n\r\n[class*='#{$si-pre}-shadow-inner-pointer'] {\r\n position: absolute;\r\n width: 141%;\r\n height: 141%;\r\n box-shadow: $si-rotated-shadow-h $si-rotated-shadow-v $si-shadow-blur $si-shadow-spread $si-shadow-color;\r\n}\r\n\r\n\r\n.#{$si-pre}-shadow-inner-pointer-top {\r\n left: 50%;\r\n transform: translate(-50%, -50%) rotate($si-rotation);\r\n}\r\n\r\n.#{$si-pre}-shadow-inner-pointer-bottom {\r\n bottom: 0;\r\n left: 50%;\r\n transform: translate(-50%, 50%) rotate($si-rotation);\r\n}\r\n\r\n.#{$si-pre}-shadow-inner-pointer-left {\r\n top: 50%;\r\n transform: translate(-50%, -50%) rotate($si-rotation);\r\n}\r\n\r\n.#{$si-pre}-shadow-inner-pointer-right {\r\n top: 50%;\r\n right: 0;\r\n transform: translate(50%, -50%) rotate($si-rotation);\r\n}\r\n\r\n\r\n\r\n//////////////////////////////\r\n// 3. Content Styles\r\n//////////////////////////////\r\n\r\n// Content styles\r\n.#{$si-pre}-frame {\r\n position: relative;\r\n flex: 1 1 auto;\r\n border-radius: $si-border-radius;\r\n overflow: hidden;\r\n z-index: 2;\r\n}\r\n\r\n.#{$si-pre}-content-wrapper {\r\n width: 100%;\r\n max-width: 100%;\r\n max-height: 100%;\r\n padding: $si-content-padding;\r\n background-color: $si-content-bg;\r\n\r\n .#{$si-pre}-has-border & {\r\n border: $si-border-width solid $si-border-color;\r\n }\r\n}\r\n\r\n.#{$si-pre}-content {\r\n overflow: auto;\r\n}\r\n\r\n\r\n\r\n//////////////////////////////\r\n// 4. Close Button\r\n//////////////////////////////\r\n\r\n.#{$si-pre}-close-button {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n border: 0;\r\n outline: none;\r\n background-color: transparent;\r\n color: inherit;\r\n font-family: Arial, Baskerville, monospace;\r\n font-size: $si-close-font-size;\r\n cursor: pointer;\r\n opacity: $si-close-opacity;\r\n appearance: none;\r\n\r\n &:hover,\r\n &:focus {\r\n opacity: $si-close-hover-opacity;\r\n }\r\n}\r\n\r\n\r\n\r\n//////////////////////////////\r\n// 5. Pointer Styles\r\n//////////////////////////////\r\n\r\n[class*='#{$si-pre}-pointer-border'] {\r\n position: absolute;\r\n border: $si-pointer-length solid transparent;\r\n z-index: 3;\r\n}\r\n\r\n$si-triangle-difference: min(round($si-border-width * ($si-root-2 - 1)), $si-pointer-length);\r\n\r\n[class*='#{$si-pre}-pointer-bg'] {\r\n position: relative;\r\n border: $si-pointer-length solid transparent;\r\n z-index: 4;\r\n\r\n .#{$si-pre}-has-border & {\r\n border-width: $si-pointer-length - $si-triangle-difference;\r\n }\r\n}\r\n\r\n.#{$si-pre}-pointer-border-top,\r\n.#{$si-pre}-pointer-border-bottom {\r\n left: 50%;\r\n transform: translate(-50%, 0);\r\n}\r\n\r\n.#{$si-pre}-pointer-border-left,\r\n.#{$si-pre}-pointer-border-right {\r\n top: 50%;\r\n transform: translate(0, -50%);\r\n}\r\n\r\n// Top pointer poisitioning\r\n.#{$si-pre}-pointer-top {\r\n border-bottom: 0;\r\n}\r\n\r\n.#{$si-pre}-pointer-border-top {\r\n bottom: 0;\r\n border-top-color: $si-border-color;\r\n}\r\n\r\n.#{$si-pre}-pointer-bg-top {\r\n border-top-color: $si-content-bg;\r\n\r\n .#{$si-pre}-has-border & {\r\n top: -$si-border-width;\r\n margin-bottom: $si-triangle-difference;\r\n }\r\n}\r\n\r\n\r\n// Bottom pointer positioning\r\n.#{$si-pre}-pointer-bottom {\r\n border-top: 0;\r\n}\r\n\r\n.#{$si-pre}-pointer-border-bottom {\r\n top: 0;\r\n border-bottom-color: $si-border-color;\r\n}\r\n\r\n.#{$si-pre}-pointer-bg-bottom {\r\n border-bottom-color: $si-content-bg;\r\n\r\n .#{$si-pre}-has-border & {\r\n bottom: -$si-border-width;\r\n margin-top: $si-triangle-difference;\r\n }\r\n}\r\n\r\n// Left pointer positioning\r\n.#{$si-pre}-pointer-left {\r\n border-right: 0;\r\n}\r\n\r\n.#{$si-pre}-pointer-border-left {\r\n right: 0;\r\n border-left-color: $si-border-color;\r\n}\r\n\r\n.#{$si-pre}-pointer-bg-left {\r\n border-left-color: $si-content-bg;\r\n\r\n .#{$si-pre}-has-border & {\r\n left: -$si-border-width;\r\n margin-right: $si-triangle-difference;\r\n }\r\n}\r\n\r\n// Right pointer positioning\r\n.#{$si-pre}-pointer-right {\r\n border-left: 0;\r\n}\r\n\r\n.#{$si-pre}-pointer-border-right {\r\n left: 0;\r\n border-right-color: $si-border-color;\r\n}\r\n\r\n.#{$si-pre}-pointer-bg-right {\r\n border-right-color: $si-content-bg;\r\n\r\n .#{$si-pre}-has-border & {\r\n right: -$si-border-width;\r\n margin-left: $si-triangle-difference;\r\n }\r\n}\r\n",".si-float-wrapper {\n position: absolute;\n width: 100%; }\n .si-float-wrapper,\n .si-float-wrapper * {\n box-sizing: border-box; }\n\n[class*='si-wrapper'] {\n display: flex;\n position: absolute;\n align-items: center;\n font-size: 14px;\n cursor: default; }\n\n.si-wrapper-top {\n flex-direction: column;\n margin-top: -40px;\n margin-left: 0px;\n transform: translate(-50%, -100%); }\n\n.si-wrapper-bottom {\n flex-direction: column-reverse;\n margin-top: 0px;\n margin-left: 0px;\n transform: translate(-50%, 0); }\n\n.si-wrapper-left {\n margin-top: -20px;\n margin-left: -11px;\n transform: translate(-100%, -50%); }\n\n.si-wrapper-right {\n flex-direction: row-reverse;\n margin-top: -20px;\n margin-left: 11px;\n transform: translate(0, -50%); }\n\n[class*='si-shadow-wrapper'] {\n display: flex;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0.29804;\n z-index: 1; }\n\n.si-shadow-wrapper-top,\n.si-shadow-wrapper-bottom {\n flex-direction: column; }\n\n.si-shadow-pointer-bottom,\n.si-shadow-pointer-right {\n order: -1; }\n\n.si-shadow-frame {\n box-shadow: 0 1px 3px 0 #000; }\n\n[class*='si-shadow-pointer'] {\n position: relative;\n width: 15px;\n height: 15px;\n margin: auto; }\n\n[class*='si-shadow-inner-pointer'] {\n position: absolute;\n width: 141%;\n height: 141%;\n box-shadow: -0.70711px 0.70711px 3px 0 #000; }\n\n.si-shadow-inner-pointer-top {\n left: 50%;\n transform: translate(-50%, -50%) rotate(-45deg); }\n\n.si-shadow-inner-pointer-bottom {\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 50%) rotate(-45deg); }\n\n.si-shadow-inner-pointer-left {\n top: 50%;\n transform: translate(-50%, -50%) rotate(-45deg); }\n\n.si-shadow-inner-pointer-right {\n top: 50%;\n right: 0;\n transform: translate(50%, -50%) rotate(-45deg); }\n\n.si-frame {\n position: relative;\n flex: 1 1 auto;\n border-radius: 3px;\n overflow: hidden;\n z-index: 2; }\n\n.si-content-wrapper {\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n padding: 30px;\n background-color: #fff; }\n .si-has-border .si-content-wrapper {\n border: 1px solid #bbb; }\n\n.si-content {\n overflow: auto; }\n\n.si-close-button {\n position: absolute;\n top: 0;\n right: 0;\n border: 0;\n outline: none;\n background-color: transparent;\n color: inherit;\n font-family: Arial, Baskerville, monospace;\n font-size: 24px;\n cursor: pointer;\n opacity: 0.5;\n appearance: none; }\n .si-close-button:hover, .si-close-button:focus {\n opacity: 0.7; }\n\n[class*='si-pointer-border'] {\n position: absolute;\n border: 15px solid transparent;\n z-index: 3; }\n\n[class*='si-pointer-bg'] {\n position: relative;\n border: 15px solid transparent;\n z-index: 4; }\n .si-has-border [class*='si-pointer-bg'] {\n border-width: 15px; }\n\n.si-pointer-border-top,\n.si-pointer-border-bottom {\n left: 50%;\n transform: translate(-50%, 0); }\n\n.si-pointer-border-left,\n.si-pointer-border-right {\n top: 50%;\n transform: translate(0, -50%); }\n\n.si-pointer-top {\n border-bottom: 0; }\n\n.si-pointer-border-top {\n bottom: 0;\n border-top-color: #bbb; }\n\n.si-pointer-bg-top {\n border-top-color: #fff; }\n .si-has-border .si-pointer-bg-top {\n top: -1px;\n margin-bottom: 0px; }\n\n.si-pointer-bottom {\n border-top: 0; }\n\n.si-pointer-border-bottom {\n top: 0;\n border-bottom-color: #bbb; }\n\n.si-pointer-bg-bottom {\n border-bottom-color: #fff; }\n .si-has-border .si-pointer-bg-bottom {\n bottom: -1px;\n margin-top: 0px; }\n\n.si-pointer-left {\n border-right: 0; }\n\n.si-pointer-border-left {\n right: 0;\n border-left-color: #bbb; }\n\n.si-pointer-bg-left {\n border-left-color: #fff; }\n .si-has-border .si-pointer-bg-left {\n left: -1px;\n margin-right: 0px; }\n\n.si-pointer-right {\n border-left: 0; }\n\n.si-pointer-border-right {\n left: 0;\n border-right-color: #bbb; }\n\n.si-pointer-bg-right {\n border-right-color: #fff; }\n .si-has-border .si-pointer-bg-right {\n right: -1px;\n margin-left: 0px; }\n","// Content\r\n$si-content-bg: \t#fff !default;\t\t\t\t\t// Background color of the infowindow\r\n$si-content-padding: \t30px !default;\t\t\t\t\t// Padding of the infowindow\r\n$si-font-size:\t\t\t\t14px !default;\t\t\t\t\t// Font size of the infowindow content\r\n\r\n// Border\r\n$si-border-width: \t\t\t1px !default;\t\t\t\t\t// Width of the border\r\n$si-border-color: \t\t\t#bbb !default;\t\t\t\t\t// Color of the border\r\n$si-border-radius: \t3px !default;\t\t\t\t\t// Border radius of the infowindow\r\n\r\n// Pointer\r\n$si-pointer-length: \t15px !default;\t\t\t\t\t// Length of the pointer, from the edge of the infowindow to the tip\r\n\r\n// Shadow\r\n$si-shadow-h: \t0 !default;\t\t\t\t\t\t// Shadow horizontal offset\r\n$si-shadow-v: \t1px !default;\t\t\t\t\t// Shadow vertical offset\r\n$si-shadow-blur: \t3px !default;\t\t\t\t\t// Shadow blur radius\r\n$si-shadow-spread: \t0 !default;\t\t\t\t\t\t// Shadow spread radius\r\n$si-shadow-color: \t#000 !default;\t\t\t\t\t// Shadow color\r\n$si-shadow-opacity: \t0.298039 !default;\t\t\t\t// Shadow opacity\r\n\r\n// Close button\r\n$si-close-font-size:\t\t24px !default;\t\t\t\t\t// Size of the close button text\r\n$si-close-opacity:\t\t\t0.5 !default;\t\t\t\t\t// Initial opacity of the close button\r\n$si-close-hover-opacity:\t0.7 !default;\t\t\t\t\t// Hover and focus opacity of the close button\r\n"]} \ No newline at end of file diff --git a/dist/snazzy-info-window.min.js.map b/dist/snazzy-info-window.min.js.map index 8a2d7b5..06e7ea1 100644 --- a/dist/snazzy-info-window.min.js.map +++ b/dist/snazzy-info-window.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["snazzy-info-window.js"],"names":["copyKeys","target","source","Object","keys","forEach","key","mergeDefaultOptions","opts","copy","_defaultOptions","obj","_typeof","objCopy","parseAttribute","attribute","defaultValue","re","test","match","exec","number","units","value","original","setHTML","container","content","firstChild","removeChild","innerHTML","appendChild","oppositePosition","p","capitalizePosition","charAt","toUpperCase","slice","_classPrefix","_root2","_inverseRoot2","_defaultShadow","h","v","blur","spread","color","position","pointer","openOnMarkerClick","closeOnMapClick","showCloseButton","panOnOpen","edgeOffset","top","right","bottom","left","SnazzyInfoWindow","_classCallCheck","this","_this","_possibleConstructorReturn","__proto__","getPrototypeOf","call","_html","_opts","_callbacks","callbacks","_marker","marker","_isOpen","_listeners","google","_openOnMarkerClickListener","maps","event","addListener","getMap","open","toLowerCase","undefined","border","shadow","callback","lamda","apply","listener","removeListener","result","activateCallback","setMap","clearListeners","wrapper","_this2","offset","style","marginLeft","marginTop","bg","backgroundColor","contentWrapper","pointerBg","padding","shadowFrame","borderRadius","fontSize","fontColor","shadowPointer","width","height","pointerBorder","borderWidth","bWidth","Math","round","offsetWidth","clientWidth","pLength","min","offsetHeight","triangleDiff","reverseP","borderColor","isSet","hOffset","vOffset","formatBoxShadow","boxShadow","hRotated","vRotated","shadowPointerInner","opacity","shadowWrapper","markerPos","getProjection","fromLatLngToDivPixel","floatWrapper","floor","y","x","resize","reposition","_this3","applyCss","element","args","i","length","className","newElement","_len","arguments","Array","_key","document","createElement","wrapperClass","closeButtonMarkup","d","closeButton","setAttribute","getPanes","floatPane","map","push","close","_previousWidth","_previousHeight","getDiv","ow","oh","pw","ph","draw","addDomListener","e","cancelBubble","stopPropagation","mouseEvents","parent","parentElement","mb","getBoundingClientRect","mib","getMapInnerBounds","wb","dx","dy","panBy","maxWidth","maxHeight","OverlayView"],"mappings":"k0BA2BA,QAASA,GAASC,EAAQC,GAClBD,GAAUC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AASoI,EAAGpI,QACvBqI,EAAKD,EAAGlI,MAAQgI,EAAIlI,MAAQoI,EAAG7E,QAE/B2E,EAAInI,KAAOqI,EAAGrI,IACduI,EAAKF,EAAGrI,IAAMmI,EAAInI,IACXmI,EAAIjI,QAAUmI,EAAGnI,SACxBqI,EAAKF,EAAGrI,KAAOmI,EAAIjI,OAASmI,EAAG5E,SAExB,IAAP6E,GAAmB,IAAPC,GACZjI,KAAKmB,SAAS+G,MAAMF,EAAIC,qCAM5B,GAAKjI,KAAKM,MAAV,CAGA,GAAMuH,GAAM7H,KAAK8H,oBAEbK,EAAWN,EAAI3E,KACS5B,UAAxBtB,KAAKO,MAAM4H,WACXA,EAAW5E,KAAKK,IAAIuE,EAAUnI,KAAKO,MAAM4H,WAE7CA,GAAanI,KAAKM,MAAM4B,QAAQuB,YAAczD,KAAKM,MAAMvC,QAAQ0F,YACjEzD,KAAKM,MAAMvC,QAAQsE,MAAM8F,SAAcA,EAAvC,IAGA,IAAIC,GAAYP,EAAI1E,MACS7B,UAAzBtB,KAAKO,MAAM6H,YACXA,EAAY7E,KAAKK,IAAIwE,EAAWpI,KAAKO,MAAM6H,YAE/CA,GAAcpI,KAAKM,MAAM4B,QAAQ2B,aAAe7D,KAAKM,MAAMvC,QAAQ8F,aACnE7D,KAAKM,MAAMvC,QAAQsE,MAAM+F,UAAeA,EAAxC,aAzfsCtH,OAAOE,KAAKqH,uBAArCvI","file":"snazzy-info-window.min.js","sourcesContent":["// Global variables\nconst _classPrefix = 'si-';\nconst _root2 = 1.41421356237;\nconst _inverseRoot2 = 0.7071067811865474;\nconst _defaultShadow = {\n h: '0px',\n v: '3px',\n blur: '6px',\n spread: '0px',\n color: '#000'\n};\nconst _defaultOptions = {\n position: 'top',\n pointer: true,\n openOnMarkerClick: true,\n closeOnMapClick: true,\n showCloseButton: true,\n panOnOpen: true,\n edgeOffset: {\n top: 20,\n right: 20,\n bottom: 20,\n left: 20\n }\n};\n\n// Copy keys from the source into the target\nfunction copyKeys(target, source) {\n if (target && source) {\n Object.keys(source).forEach((key) => {\n target[key] = source[key];\n });\n }\n}\n\n// We need to safely merge options from the defaults. This will make\n// sure settings like edgeOffset are properly assigned.\nfunction mergeDefaultOptions(opts) {\n const copy = {};\n copyKeys(copy, _defaultOptions);\n copyKeys(copy, opts);\n Object.keys(_defaultOptions).forEach((key) => {\n const obj = _defaultOptions[key];\n if (typeof obj === 'object') {\n const objCopy = {};\n copyKeys(objCopy, obj);\n copyKeys(objCopy, copy[key]);\n copy[key] = objCopy;\n }\n });\n return copy;\n}\n\n// Parse a css attribute into the numeric portion and the units\nfunction parseAttribute(attribute, defaultValue) {\n // 1em, 1.0em, 0.1em, .1em, 1. em\n const re = /^(-{0,1}\\.{0,1}\\d+(\\.\\d+)?)[\\s|\\.]*(\\w*)$/;\n if (attribute && re.test(attribute)) {\n const match = re.exec(attribute);\n const number = match[1];\n const units = match[3] || 'px';\n return { value: number * 1, units, original: attribute };\n }\n if (defaultValue) {\n return parseAttribute(defaultValue);\n }\n return { original: defaultValue };\n}\n\n// Set the html of a container. Should support both raw text and a single\n// DOM Element.\nfunction setHTML(container, content) {\n if (container) {\n // Clear out everything in the container\n while (container.firstChild) {\n container.removeChild(container.firstChild);\n }\n if (content) {\n if (typeof content === 'string') {\n container.innerHTML = content;\n } else {\n container.appendChild(content);\n }\n }\n }\n}\n\n// Get the opposite of a given position\nfunction oppositePosition(p) {\n if (p === 'top') {\n return 'bottom';\n } else if (p === 'bottom') {\n return 'top';\n } else if (p === 'left') {\n return 'right';\n } else if (p === 'right') {\n return 'left';\n }\n return p;\n}\n\n// Return the position with the first letter capitalized\nfunction capitalizePosition(p) {\n return p.charAt(0).toUpperCase() + p.slice(1);\n}\n\nexport default class SnazzyInfoWindow extends google.maps.OverlayView {\n\n constructor(opts) {\n super(opts);\n // Private properties\n this._html = null;\n this._opts = mergeDefaultOptions(opts);\n this._callbacks = this._opts.callbacks || {};\n this._marker = this._opts.marker;\n this._isOpen = false;\n this._listeners = [];\n\n // This listener remains active when the info window is closed.\n if (google && this._marker && this._opts.openOnMarkerClick) {\n this._openOnMarkerClickListener = google.maps.event.addListener(this._marker, 'click', () => {\n if (!this.getMap()) {\n this.open();\n }\n });\n }\n\n // Validate the options\n let p = this._opts.position;\n if (p) {\n p = p.toLowerCase();\n }\n if (p !== 'top' && p !== 'bottom' &&\n p !== 'left' && p !== 'right') {\n this._opts.position = _defaultOptions.position;\n }\n if (this._opts.border === undefined || this._opts.border === true) {\n this._opts.border = {};\n }\n if (this._opts.pointer === undefined) {\n this._opts.pointer = _defaultOptions.pointer;\n }\n if (this._opts.shadow === undefined || this._opts.shadow === true) {\n this._opts.shadow = {};\n }\n }\n\n // Activate the specified callback and return the result\n activateCallback(callback) {\n const lamda = this._callbacks[callback];\n return lamda ? lamda.apply(this) : undefined;\n }\n\n // Will clear all listeners that are used during the open state.\n clearListeners() {\n if (google) {\n if (this._listeners) {\n this._listeners.forEach((listener) => {\n google.maps.event.removeListener(listener);\n });\n }\n this._listeners = [];\n }\n }\n\n // Open the info window after attaching to a specific marker.\n open() {\n const result = this.activateCallback('beforeOpen');\n if (result !== undefined && !result) {\n return;\n }\n if (this._marker) {\n this.setMap(this._marker.getMap());\n }\n }\n\n // Close the info window.\n close() {\n const result = this.activateCallback('beforeClose');\n if (result !== undefined && !result) {\n return;\n }\n this.clearListeners();\n this.setMap(null);\n }\n\n // Force close the map and remove any event listeners attached to google\n destroy() {\n if (this.getMap()) {\n this.setMap(null);\n }\n\n if (google) {\n if (this._openOnMarkerClickListener) {\n google.maps.event.removeListener(this._openOnMarkerClickListener);\n this._openOnMarkerClickListener = null;\n }\n }\n this.clearListeners();\n }\n\n setContent(content) {\n this._opts.content = content;\n if (this._html && this._html.content) {\n setHTML(this._html.content, content);\n }\n }\n\n getWrapper() {\n if (this._html) {\n return this._html.wrapper;\n }\n return null;\n }\n\n // Implementation of OverlayView draw method.\n draw() {\n if (!this._marker || !this._html) {\n return;\n }\n\n // 1. Assign offset\n const offset = this._opts.offset;\n if (offset) {\n if (offset.left) {\n this._html.wrapper.style.marginLeft = offset.left;\n }\n if (offset.top) {\n this._html.wrapper.style.marginTop = offset.top;\n }\n }\n // 2. Set the background color\n const bg = this._opts.backgroundColor;\n if (bg) {\n this._html.contentWrapper.style.backgroundColor = bg;\n if (this._opts.pointer) {\n this._html.pointerBg.style[`border${capitalizePosition(this._opts.position)}Color`] = bg;\n }\n }\n // 3. Padding\n if (this._opts.padding) {\n this._html.contentWrapper.style.padding = this._opts.padding;\n if (this._opts.shadow) {\n this._html.shadowFrame.style.padding = this._opts.padding;\n }\n }\n // 4. Border radius\n if (this._opts.borderRadius) {\n this._html.contentWrapper.style.borderRadius = this._opts.borderRadius;\n if (this._opts.shadow) {\n this._html.shadowFrame.style.borderRadius = this._opts.borderRadius;\n }\n }\n // 5. Font Size\n if (this._opts.fontSize) {\n this._html.wrapper.style.fontSize = this._opts.fontSize;\n }\n // 6. Font Color\n if (this._opts.fontColor) {\n this._html.contentWrapper.style.color = this._opts.fontColor;\n }\n // 7. Pointer\n // Check if the pointer is enabled. Also make sure the value isn't just the boolean true.\n if (this._opts.pointer && this._opts.pointer !== true) {\n if (this._opts.shadow) {\n this._html.shadowPointer.style.width = this._opts.pointer;\n this._html.shadowPointer.style.height = this._opts.pointer;\n }\n if (this._html.pointerBorder) {\n this._html.pointerBorder.style.borderWidth = this._opts.pointer;\n }\n this._html.pointerBg.style.borderWidth = this._opts.pointer;\n }\n\n // 8. Border\n if (this._opts.border) {\n // Calculate the border width\n let bWidth = 0;\n if (this._opts.border.width !== undefined) {\n bWidth = parseAttribute(this._opts.border.width, '0px');\n this._html.contentWrapper.style.borderWidth = bWidth.value + bWidth.units;\n }\n bWidth = Math.round((this._html.contentWrapper.offsetWidth -\n this._html.contentWrapper.clientWidth) / 2.0);\n bWidth = parseAttribute(`${bWidth}px`, '0px');\n\n if (this._opts.pointer) {\n // Calculate the pointer length\n let pLength = Math.min(this._html.pointerBorder.offsetHeight,\n this._html.pointerBorder.offsetWidth);\n pLength = parseAttribute(`${pLength}px`, '0px');\n\n let triangleDiff = Math.round(bWidth.value * (_root2 - 1));\n triangleDiff = Math.min(triangleDiff, pLength.value);\n\n this._html.pointerBg.style.borderWidth =\n (pLength.value - triangleDiff) + pLength.units;\n\n const reverseP = capitalizePosition(oppositePosition(this._opts.position));\n this._html.pointerBg.style[`margin${reverseP}`] =\n triangleDiff + bWidth.units;\n this._html.pointerBg.style[this._opts.position] =\n -bWidth.value + bWidth.units;\n }\n const color = this._opts.border.color;\n if (color) {\n this._html.contentWrapper.style.borderColor = color;\n if (this._html.pointerBorder) {\n this._html.pointerBorder.style[`border${capitalizePosition(this._opts.position)}Color`] = color;\n }\n }\n }\n // 9. Shadow\n if (this._opts.shadow) {\n // Check if any of the shadow settings have actually been set\n const shadow = this._opts.shadow;\n const isSet = (attribute) => {\n const v = shadow[attribute];\n return v !== undefined && v != null;\n };\n\n if (isSet('h') || isSet('v') || isSet('blur') || isSet('spread') || isSet('color')) {\n const hOffset = parseAttribute(shadow.h, _defaultShadow.h);\n const vOffset = parseAttribute(shadow.v, _defaultShadow.v);\n const blur = parseAttribute(shadow.blur, _defaultShadow.blur);\n const spread = parseAttribute(shadow.spread, _defaultShadow.spread);\n const color = shadow.color || _defaultShadow.color;\n const formatBoxShadow = (h, v) => {\n return `${h} ${v} ${blur.original} ${spread.original} ${color}`;\n };\n\n this._html.shadowFrame.style.boxShadow =\n formatBoxShadow(hOffset.original, vOffset.original);\n\n // Correctly rotate the shadows before the css transform\n const hRotated = (_inverseRoot2 * (hOffset.value - vOffset.value)) + hOffset.units;\n const vRotated = (_inverseRoot2 * (hOffset.value + vOffset.value)) + vOffset.units;\n this._html.shadowPointerInner.style.boxShadow = formatBoxShadow(hRotated, vRotated);\n }\n if (this._opts.shadow.opacity) {\n this._html.shadowWrapper.style.opacity = this._opts.shadow.opacity;\n }\n }\n\n const markerPos = this.getProjection().fromLatLngToDivPixel(this._marker.position);\n this._html.floatWrapper.style.top = `${Math.floor(markerPos.y)}px`;\n this._html.floatWrapper.style.left = `${Math.floor(markerPos.x)}px`;\n\n if (!this._isOpen) {\n this._isOpen = true;\n this.resize();\n this.reposition();\n this.activateCallback('afterOpen');\n }\n }\n\n // Implementation of OverlayView onAdd method.\n onAdd() {\n if (this._html) {\n return;\n }\n // Used for creating new elements\n const applyCss = (element, args) => {\n if (element && args) {\n for (let i = 0; i < args.length; i++) {\n const className = args[i];\n if (className) {\n if (element.className) {\n element.className += ' ';\n }\n element.className += _classPrefix + className;\n }\n }\n }\n };\n const newElement = (...args) => {\n const element = document.createElement('div');\n applyCss(element, args);\n return element;\n };\n\n this._html = {};\n\n // 1. Create the wrapper\n this._html.wrapper = newElement(\n `wrapper-${this._opts.position}`\n );\n if (this._opts.wrapperClass) {\n this._html.wrapper.className += ` ${this._opts.wrapperClass}`;\n }\n if (this._opts.border) {\n applyCss(this._html.wrapper, ['has-border']);\n }\n\n // 2. Create the shadow\n if (this._opts.shadow) {\n this._html.shadowWrapper = newElement(\n `shadow-wrapper-${this._opts.position}`\n );\n this._html.shadowFrame = newElement(\n 'frame',\n 'shadow-frame'\n );\n this._html.shadowWrapper.appendChild(this._html.shadowFrame);\n\n if (this._opts.pointer) {\n this._html.shadowPointer = newElement(\n `shadow-pointer-${this._opts.position}`\n );\n this._html.shadowPointerInner = newElement(\n `shadow-inner-pointer-${this._opts.position}`\n );\n this._html.shadowPointer.appendChild(this._html.shadowPointerInner);\n this._html.shadowWrapper.appendChild(this._html.shadowPointer);\n }\n\n this._html.wrapper.appendChild(this._html.shadowWrapper);\n }\n\n // 3. Create the content\n this._html.contentWrapper = newElement(\n 'frame',\n 'content-wrapper'\n );\n this._html.content = newElement(\n 'content'\n );\n if (this._opts.content) {\n setHTML(this._html.content, this._opts.content);\n }\n\n // 4. Create the close button\n if (this._opts.showCloseButton) {\n if (this._opts.closeButtonMarkup) {\n const d = document.createElement('div');\n setHTML(d, this._opts.closeButtonMarkup);\n this._html.closeButton = d.firstChild;\n } else {\n this._html.closeButton = document.createElement('button');\n this._html.closeButton.setAttribute('type', 'button');\n this._html.closeButton.innerHTML = '×';\n applyCss(this._html.closeButton, ['close-button']);\n }\n this._html.contentWrapper.appendChild(this._html.closeButton);\n }\n this._html.contentWrapper.appendChild(this._html.content);\n this._html.wrapper.appendChild(this._html.contentWrapper);\n\n // 5. Create the pointer\n if (this._opts.pointer) {\n if (this._opts.border) {\n this._html.pointerBorder = newElement(\n `pointer-${this._opts.position}`,\n `pointer-border-${this._opts.position}`\n );\n this._html.wrapper.appendChild(this._html.pointerBorder);\n }\n this._html.pointerBg = newElement(\n `pointer-${this._opts.position}`,\n `pointer-bg-${this._opts.position}`\n );\n this._html.wrapper.appendChild(this._html.pointerBg);\n }\n\n // Create an outer wrapper\n this._html.floatWrapper = newElement(\n 'float-wrapper'\n );\n this._html.floatWrapper.appendChild(this._html.wrapper);\n\n // Add the wrapper to the Google Maps float pane\n this.getPanes().floatPane.appendChild(this._html.floatWrapper);\n\n // Now add all the event listeners\n const map = this.getMap();\n this.clearListeners();\n if (this._opts.closeOnMapClick) {\n this._listeners.push(google.maps.event.addListener(map, 'click', () => {\n this.close();\n }));\n }\n if (google) {\n // Clear out the previous map bounds\n this._previousWidth = null;\n this._previousHeight = null;\n this._listeners.push(google.maps.event.addListener(map, 'bounds_changed', () => {\n const d = map.getDiv();\n const ow = d.offsetWidth;\n const oh = d.offsetHeight;\n const pw = this._previousWidth;\n const ph = this._previousHeight;\n if (pw === null || ph === null || pw !== ow || ph !== oh) {\n this._previousWidth = ow;\n this._previousHeight = oh;\n this.resize();\n }\n }));\n\n // Marker moves\n if (this._marker) {\n this._listeners.push(google.maps.event.addListener(this._marker,\n 'position_changed', () => {\n this.draw();\n }));\n }\n\n // Close button\n if (this._opts.showCloseButton && !this._opts.closeButtonMarkup) {\n this._listeners.push(google.maps.event.addDomListener(this._html.closeButton,\n 'click', (e) => {\n e.cancelBubble = true;\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n this.close();\n }));\n }\n\n // Stop the mouse event propagation\n const mouseEvents = ['click', 'dblclick', 'rightclick', 'contextmenu',\n 'drag', 'dragend', 'dragstart',\n 'mousedown', 'mouseout', 'mouseover', 'mouseup',\n 'touchstart', 'touchend', 'touchmove',\n 'wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'];\n mouseEvents.forEach((event) => {\n this._listeners.push(google.maps.event.addDomListener(this._html.wrapper,\n event, (e) => {\n e.cancelBubble = true;\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n }));\n });\n }\n\n\n this.activateCallback('open');\n }\n\n // Implementation of OverlayView onRemove method\n onRemove() {\n this.activateCallback('close');\n if (this._html) {\n const parent = this._html.floatWrapper.parentElement;\n if (parent) {\n parent.removeChild(this._html.floatWrapper);\n }\n this._html = null;\n }\n this._isOpen = false;\n this.activateCallback('afterClose');\n }\n\n // The map inner bounds used for panning and resizing\n getMapInnerBounds() {\n const mb = this.getMap().getDiv().getBoundingClientRect();\n const mib = {\n top: mb.top + this._opts.edgeOffset.top,\n right: mb.right - this._opts.edgeOffset.right,\n bottom: mb.bottom - this._opts.edgeOffset.bottom,\n left: mb.left + this._opts.edgeOffset.left\n };\n mib.width = mib.right - mib.left;\n mib.height = mib.bottom - mib.top;\n return mib;\n }\n\n // Pan the google map such that the info window is visible\n reposition() {\n if (!this._opts.panOnOpen || !this._html) {\n return;\n }\n const mib = this.getMapInnerBounds();\n const wb = this._html.wrapper.getBoundingClientRect();\n let dx = 0;\n let dy = 0;\n if (mib.left >= wb.left) {\n dx = wb.left - mib.left;\n } else if (mib.right <= wb.right) {\n dx = wb.left - (mib.right - wb.width);\n }\n if (mib.top >= wb.top) {\n dy = wb.top - mib.top;\n } else if (mib.bottom <= wb.bottom) {\n dy = wb.top - (mib.bottom - wb.height);\n }\n if (dx !== 0 || dy !== 0) {\n this.getMap().panBy(dx, dy);\n }\n }\n\n // Resize the info window to fit within the map bounds and edge offset\n resize() {\n if (!this._html) {\n return;\n }\n const mib = this.getMapInnerBounds();\n // Handle the max width\n let maxWidth = mib.width;\n if (this._opts.maxWidth !== undefined) {\n maxWidth = Math.min(maxWidth, this._opts.maxWidth);\n }\n maxWidth -= (this._html.wrapper.offsetWidth - this._html.content.offsetWidth);\n this._html.content.style.maxWidth = `${maxWidth}px`;\n\n // Handle the max height\n let maxHeight = mib.height;\n if (this._opts.maxHeight !== undefined) {\n maxHeight = Math.min(maxHeight, this._opts.maxHeight);\n }\n maxHeight -= (this._html.wrapper.offsetHeight - this._html.content.offsetHeight);\n this._html.content.style.maxHeight = `${maxHeight}px`;\n }\n}\n"]} \ No newline at end of file +{"version":3,"sources":["snazzy-info-window.js"],"names":["copyKeys","target","source","Object","keys","forEach","key","mergeDefaultOptions","opts","copy","_defaultOptions","obj","_typeof","objCopy","parseAttribute","attribute","defaultValue","re","test","match","exec","number","units","value","original","setHTML","container","content","firstChild","removeChild","innerHTML","appendChild","oppositePosition","p","capitalizePosition","charAt","toUpperCase","slice","_classPrefix","_root2","_inverseRoot2","_defaultShadow","h","v","blur","spread","color","position","pointer","openOnMarkerClick","closeOnMapClick","showCloseButton","panOnOpen","edgeOffset","top","right","bottom","left","SnazzyInfoWindow","_classCallCheck","this","_this","_possibleConstructorReturn","__proto__","getPrototypeOf","call","_html","_opts","_callbacks","callbacks","_marker","marker","_isOpen","_listeners","google","_openOnMarkerClickListener","maps","event","addListener","getMap","open","toLowerCase","undefined","border","shadow","callback","lamda","apply","listener","removeListener","result","activateCallback","setMap","clearListeners","wrapper","_this2","offset","style","marginLeft","marginTop","bg","backgroundColor","contentWrapper","pointerBg","padding","shadowFrame","borderRadius","fontSize","fontColor","shadowPointer","width","height","pointerBorder","borderWidth","bWidth","Math","round","offsetWidth","clientWidth","pLength","min","offsetHeight","triangleDiff","reverseP","borderColor","isSet","hOffset","vOffset","formatBoxShadow","boxShadow","hRotated","vRotated","shadowPointerInner","opacity","shadowWrapper","markerPos","getProjection","fromLatLngToDivPixel","floatWrapper","floor","y","x","resize","reposition","_this3","applyCss","element","args","i","length","className","newElement","_len","arguments","Array","_key","document","createElement","wrapperClass","closeButtonMarkup","d","closeButton","setAttribute","getPanes","floatPane","map","push","close","_previousWidth","_previousHeight","getDiv","ow","oh","pw","ph","draw","addDomListener","e","cancelBubble","stopPropagation","mouseEvents","parent","parentElement","mb","getBoundingClientRect","mib","getMapInnerBounds","wb","dx","dy","panBy","maxWidth","maxHeight","OverlayView"],"mappings":"k0BA2BA,QAASA,GAASC,EAAQC,GAClBD,GAAUC,GACVC,OAAOC,KAAKF,GAAQG,QAAQ,SAACC,GACzBL,EAAOK,GAAOJ,EAAOI,KAOjC,QAASC,GAAoBC,GACzB,GAAMC,KAYN,OAXAT,GAASS,EAAMC,GACfV,EAASS,EAAMD,GACfL,OAAOC,KAAKM,GAAiBL,QAAQ,SAACC,GAClC,GAAMK,GAAMD,EAAgBJ,EAC5B,IAAmB,YAAf,mBAAOK,GAAP,YAAAC,EAAOD,IAAkB,CACzB,GAAME,KACNb,GAASa,EAASF,GAClBX,EAASa,EAASJ,EAAKH,IACvBG,EAAKH,GAAOO,KAGbJ,EAIX,QAASK,GAAeC,EAAWC,GAE/B,GAAMC,GAAK,2CACX,IAAIF,GAAaE,EAAGC,KAAKH,GAAY,CACjC,GAAMI,GAAQF,EAAGG,KAAKL,GAChBM,EAASF,EAAM,GACfG,EAAQH,EAAM,IAAM,IAC1B,QAASI,MAAgB,EAATF,EAAYC,MAAAA,EAAOE,SAAUT,GAEjD,MAAIC,GACOF,EAAeE,IAEjBQ,SAAUR,GAKvB,QAASS,GAAQC,EAAWC,GACxB,GAAID,EAAW,CAEX,KAAOA,EAAUE,YACbF,EAAUG,YAAYH,EAAUE,WAEhCD,KACuB,gBAAZA,GACPD,EAAUI,UAAYH,EAEtBD,EAAUK,YAAYJ,KAOtC,QAASK,GAAiBC,GACtB,MAAU,QAANA,EACO,SACM,WAANA,EACA,MACM,SAANA,EACA,QACM,UAANA,EACA,OAEJA,EAIX,QAASC,GAAmBD,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\r\nconst _classPrefix = 'si-';\r\nconst _root2 = 1.41421356237;\r\nconst _inverseRoot2 = 0.7071067811865474;\r\nconst _defaultShadow = {\r\n h: '0px',\r\n v: '3px',\r\n blur: '6px',\r\n spread: '0px',\r\n color: '#000'\r\n};\r\nconst _defaultOptions = {\r\n position: 'top',\r\n pointer: true,\r\n openOnMarkerClick: true,\r\n closeOnMapClick: true,\r\n showCloseButton: true,\r\n panOnOpen: true,\r\n edgeOffset: {\r\n top: 20,\r\n right: 20,\r\n bottom: 20,\r\n left: 20\r\n }\r\n};\r\n\r\n// Copy keys from the source into the target\r\nfunction copyKeys(target, source) {\r\n if (target && source) {\r\n Object.keys(source).forEach((key) => {\r\n target[key] = source[key];\r\n });\r\n }\r\n}\r\n\r\n// We need to safely merge options from the defaults. This will make\r\n// sure settings like edgeOffset are properly assigned.\r\nfunction mergeDefaultOptions(opts) {\r\n const copy = {};\r\n copyKeys(copy, _defaultOptions);\r\n copyKeys(copy, opts);\r\n Object.keys(_defaultOptions).forEach((key) => {\r\n const obj = _defaultOptions[key];\r\n if (typeof obj === 'object') {\r\n const objCopy = {};\r\n copyKeys(objCopy, obj);\r\n copyKeys(objCopy, copy[key]);\r\n copy[key] = objCopy;\r\n }\r\n });\r\n return copy;\r\n}\r\n\r\n// Parse a css attribute into the numeric portion and the units\r\nfunction parseAttribute(attribute, defaultValue) {\r\n // 1em, 1.0em, 0.1em, .1em, 1. em\r\n const re = /^(-{0,1}\\.{0,1}\\d+(\\.\\d+)?)[\\s|\\.]*(\\w*)$/;\r\n if (attribute && re.test(attribute)) {\r\n const match = re.exec(attribute);\r\n const number = match[1];\r\n const units = match[3] || 'px';\r\n return { value: number * 1, units, original: attribute };\r\n }\r\n if (defaultValue) {\r\n return parseAttribute(defaultValue);\r\n }\r\n return { original: defaultValue };\r\n}\r\n\r\n// Set the html of a container. Should support both raw text and a single\r\n// DOM Element.\r\nfunction setHTML(container, content) {\r\n if (container) {\r\n // Clear out everything in the container\r\n while (container.firstChild) {\r\n container.removeChild(container.firstChild);\r\n }\r\n if (content) {\r\n if (typeof content === 'string') {\r\n container.innerHTML = content;\r\n } else {\r\n container.appendChild(content);\r\n }\r\n }\r\n }\r\n}\r\n\r\n// Get the opposite of a given position\r\nfunction oppositePosition(p) {\r\n if (p === 'top') {\r\n return 'bottom';\r\n } else if (p === 'bottom') {\r\n return 'top';\r\n } else if (p === 'left') {\r\n return 'right';\r\n } else if (p === 'right') {\r\n return 'left';\r\n }\r\n return p;\r\n}\r\n\r\n// Return the position with the first letter capitalized\r\nfunction capitalizePosition(p) {\r\n return p.charAt(0).toUpperCase() + p.slice(1);\r\n}\r\n\r\nexport default class SnazzyInfoWindow extends google.maps.OverlayView {\r\n\r\n constructor(opts) {\r\n super(opts);\r\n // Private properties\r\n this._html = null;\r\n this._opts = mergeDefaultOptions(opts);\r\n this._callbacks = this._opts.callbacks || {};\r\n this._marker = this._opts.marker;\r\n this._isOpen = false;\r\n this._listeners = [];\r\n\r\n // This listener remains active when the info window is closed.\r\n if (google && this._marker && this._opts.openOnMarkerClick) {\r\n this._openOnMarkerClickListener = google.maps.event.addListener(this._marker, 'click', () => {\r\n if (!this.getMap()) {\r\n this.open();\r\n }\r\n });\r\n }\r\n\r\n // Validate the options\r\n let p = this._opts.position;\r\n if (p) {\r\n p = p.toLowerCase();\r\n }\r\n if (p !== 'top' && p !== 'bottom' &&\r\n p !== 'left' && p !== 'right') {\r\n this._opts.position = _defaultOptions.position;\r\n }\r\n if (this._opts.border === undefined || this._opts.border === true) {\r\n this._opts.border = {};\r\n }\r\n if (this._opts.pointer === undefined) {\r\n this._opts.pointer = _defaultOptions.pointer;\r\n }\r\n if (this._opts.shadow === undefined || this._opts.shadow === true) {\r\n this._opts.shadow = {};\r\n }\r\n }\r\n\r\n // Activate the specified callback and return the result\r\n activateCallback(callback) {\r\n const lamda = this._callbacks[callback];\r\n return lamda ? lamda.apply(this) : undefined;\r\n }\r\n\r\n // Will clear all listeners that are used during the open state.\r\n clearListeners() {\r\n if (google) {\r\n if (this._listeners) {\r\n this._listeners.forEach((listener) => {\r\n google.maps.event.removeListener(listener);\r\n });\r\n }\r\n this._listeners = [];\r\n }\r\n }\r\n\r\n // Open the info window after attaching to a specific marker.\r\n open() {\r\n const result = this.activateCallback('beforeOpen');\r\n if (result !== undefined && !result) {\r\n return;\r\n }\r\n if (this._marker) {\r\n this.setMap(this._marker.getMap());\r\n }\r\n }\r\n\r\n // Close the info window.\r\n close() {\r\n const result = this.activateCallback('beforeClose');\r\n if (result !== undefined && !result) {\r\n return;\r\n }\r\n this.clearListeners();\r\n this.setMap(null);\r\n }\r\n\r\n // Force close the map and remove any event listeners attached to google\r\n destroy() {\r\n if (this.getMap()) {\r\n this.setMap(null);\r\n }\r\n\r\n if (google) {\r\n if (this._openOnMarkerClickListener) {\r\n google.maps.event.removeListener(this._openOnMarkerClickListener);\r\n this._openOnMarkerClickListener = null;\r\n }\r\n }\r\n this.clearListeners();\r\n }\r\n\r\n setContent(content) {\r\n this._opts.content = content;\r\n if (this._html && this._html.content) {\r\n setHTML(this._html.content, content);\r\n }\r\n }\r\n\r\n getWrapper() {\r\n if (this._html) {\r\n return this._html.wrapper;\r\n }\r\n return null;\r\n }\r\n\r\n // Implementation of OverlayView draw method.\r\n draw() {\r\n if (!this._marker || !this._html) {\r\n return;\r\n }\r\n\r\n // 1. Assign offset\r\n const offset = this._opts.offset;\r\n if (offset) {\r\n if (offset.left) {\r\n this._html.wrapper.style.marginLeft = offset.left;\r\n }\r\n if (offset.top) {\r\n this._html.wrapper.style.marginTop = offset.top;\r\n }\r\n }\r\n // 2. Set the background color\r\n const bg = this._opts.backgroundColor;\r\n if (bg) {\r\n this._html.contentWrapper.style.backgroundColor = bg;\r\n if (this._opts.pointer) {\r\n this._html.pointerBg.style[`border${capitalizePosition(this._opts.position)}Color`] = bg;\r\n }\r\n }\r\n // 3. Padding\r\n if (this._opts.padding) {\r\n this._html.contentWrapper.style.padding = this._opts.padding;\r\n if (this._opts.shadow) {\r\n this._html.shadowFrame.style.padding = this._opts.padding;\r\n }\r\n }\r\n // 4. Border radius\r\n if (this._opts.borderRadius) {\r\n this._html.contentWrapper.style.borderRadius = this._opts.borderRadius;\r\n if (this._opts.shadow) {\r\n this._html.shadowFrame.style.borderRadius = this._opts.borderRadius;\r\n }\r\n }\r\n // 5. Font Size\r\n if (this._opts.fontSize) {\r\n this._html.wrapper.style.fontSize = this._opts.fontSize;\r\n }\r\n // 6. Font Color\r\n if (this._opts.fontColor) {\r\n this._html.contentWrapper.style.color = this._opts.fontColor;\r\n }\r\n // 7. Pointer\r\n // Check if the pointer is enabled. Also make sure the value isn't just the boolean true.\r\n if (this._opts.pointer && this._opts.pointer !== true) {\r\n if (this._opts.shadow) {\r\n this._html.shadowPointer.style.width = this._opts.pointer;\r\n this._html.shadowPointer.style.height = this._opts.pointer;\r\n }\r\n if (this._html.pointerBorder) {\r\n this._html.pointerBorder.style.borderWidth = this._opts.pointer;\r\n }\r\n this._html.pointerBg.style.borderWidth = this._opts.pointer;\r\n }\r\n\r\n // 8. Border\r\n if (this._opts.border) {\r\n // Calculate the border width\r\n let bWidth = 0;\r\n if (this._opts.border.width !== undefined) {\r\n bWidth = parseAttribute(this._opts.border.width, '0px');\r\n this._html.contentWrapper.style.borderWidth = bWidth.value + bWidth.units;\r\n }\r\n bWidth = Math.round((this._html.contentWrapper.offsetWidth -\r\n this._html.contentWrapper.clientWidth) / 2.0);\r\n bWidth = parseAttribute(`${bWidth}px`, '0px');\r\n\r\n if (this._opts.pointer) {\r\n // Calculate the pointer length\r\n let pLength = Math.min(this._html.pointerBorder.offsetHeight,\r\n this._html.pointerBorder.offsetWidth);\r\n pLength = parseAttribute(`${pLength}px`, '0px');\r\n\r\n let triangleDiff = Math.round(bWidth.value * (_root2 - 1));\r\n triangleDiff = Math.min(triangleDiff, pLength.value);\r\n\r\n this._html.pointerBg.style.borderWidth =\r\n (pLength.value - triangleDiff) + pLength.units;\r\n\r\n const reverseP = capitalizePosition(oppositePosition(this._opts.position));\r\n this._html.pointerBg.style[`margin${reverseP}`] =\r\n triangleDiff + bWidth.units;\r\n this._html.pointerBg.style[this._opts.position] =\r\n -bWidth.value + bWidth.units;\r\n }\r\n const color = this._opts.border.color;\r\n if (color) {\r\n this._html.contentWrapper.style.borderColor = color;\r\n if (this._html.pointerBorder) {\r\n this._html.pointerBorder.style[`border${capitalizePosition(this._opts.position)}Color`] = color;\r\n }\r\n }\r\n }\r\n // 9. Shadow\r\n if (this._opts.shadow) {\r\n // Check if any of the shadow settings have actually been set\r\n const shadow = this._opts.shadow;\r\n const isSet = (attribute) => {\r\n const v = shadow[attribute];\r\n return v !== undefined && v != null;\r\n };\r\n\r\n if (isSet('h') || isSet('v') || isSet('blur') || isSet('spread') || isSet('color')) {\r\n const hOffset = parseAttribute(shadow.h, _defaultShadow.h);\r\n const vOffset = parseAttribute(shadow.v, _defaultShadow.v);\r\n const blur = parseAttribute(shadow.blur, _defaultShadow.blur);\r\n const spread = parseAttribute(shadow.spread, _defaultShadow.spread);\r\n const color = shadow.color || _defaultShadow.color;\r\n const formatBoxShadow = (h, v) => {\r\n return `${h} ${v} ${blur.original} ${spread.original} ${color}`;\r\n };\r\n\r\n this._html.shadowFrame.style.boxShadow =\r\n formatBoxShadow(hOffset.original, vOffset.original);\r\n\r\n // Correctly rotate the shadows before the css transform\r\n const hRotated = (_inverseRoot2 * (hOffset.value - vOffset.value)) + hOffset.units;\r\n const vRotated = (_inverseRoot2 * (hOffset.value + vOffset.value)) + vOffset.units;\r\n this._html.shadowPointerInner.style.boxShadow = formatBoxShadow(hRotated, vRotated);\r\n }\r\n if (this._opts.shadow.opacity) {\r\n this._html.shadowWrapper.style.opacity = this._opts.shadow.opacity;\r\n }\r\n }\r\n\r\n const markerPos = this.getProjection().fromLatLngToDivPixel(this._marker.position);\r\n this._html.floatWrapper.style.top = `${Math.floor(markerPos.y)}px`;\r\n this._html.floatWrapper.style.left = `${Math.floor(markerPos.x)}px`;\r\n\r\n if (!this._isOpen) {\r\n this._isOpen = true;\r\n this.resize();\r\n this.reposition();\r\n this.activateCallback('afterOpen');\r\n }\r\n }\r\n\r\n // Implementation of OverlayView onAdd method.\r\n onAdd() {\r\n if (this._html) {\r\n return;\r\n }\r\n // Used for creating new elements\r\n const applyCss = (element, args) => {\r\n if (element && args) {\r\n for (let i = 0; i < args.length; i++) {\r\n const className = args[i];\r\n if (className) {\r\n if (element.className) {\r\n element.className += ' ';\r\n }\r\n element.className += _classPrefix + className;\r\n }\r\n }\r\n }\r\n };\r\n const newElement = (...args) => {\r\n const element = document.createElement('div');\r\n applyCss(element, args);\r\n return element;\r\n };\r\n\r\n this._html = {};\r\n\r\n // 1. Create the wrapper\r\n this._html.wrapper = newElement(\r\n `wrapper-${this._opts.position}`\r\n );\r\n if (this._opts.wrapperClass) {\r\n this._html.wrapper.className += ` ${this._opts.wrapperClass}`;\r\n }\r\n if (this._opts.border) {\r\n applyCss(this._html.wrapper, ['has-border']);\r\n }\r\n\r\n // 2. Create the shadow\r\n if (this._opts.shadow) {\r\n this._html.shadowWrapper = newElement(\r\n `shadow-wrapper-${this._opts.position}`\r\n );\r\n this._html.shadowFrame = newElement(\r\n 'frame',\r\n 'shadow-frame'\r\n );\r\n this._html.shadowWrapper.appendChild(this._html.shadowFrame);\r\n\r\n if (this._opts.pointer) {\r\n this._html.shadowPointer = newElement(\r\n `shadow-pointer-${this._opts.position}`\r\n );\r\n this._html.shadowPointerInner = newElement(\r\n `shadow-inner-pointer-${this._opts.position}`\r\n );\r\n this._html.shadowPointer.appendChild(this._html.shadowPointerInner);\r\n this._html.shadowWrapper.appendChild(this._html.shadowPointer);\r\n }\r\n\r\n this._html.wrapper.appendChild(this._html.shadowWrapper);\r\n }\r\n\r\n // 3. Create the content\r\n this._html.contentWrapper = newElement(\r\n 'frame',\r\n 'content-wrapper'\r\n );\r\n this._html.content = newElement(\r\n 'content'\r\n );\r\n if (this._opts.content) {\r\n setHTML(this._html.content, this._opts.content);\r\n }\r\n\r\n // 4. Create the close button\r\n if (this._opts.showCloseButton) {\r\n if (this._opts.closeButtonMarkup) {\r\n const d = document.createElement('div');\r\n setHTML(d, this._opts.closeButtonMarkup);\r\n this._html.closeButton = d.firstChild;\r\n } else {\r\n this._html.closeButton = document.createElement('button');\r\n this._html.closeButton.setAttribute('type', 'button');\r\n this._html.closeButton.innerHTML = '×';\r\n applyCss(this._html.closeButton, ['close-button']);\r\n }\r\n this._html.contentWrapper.appendChild(this._html.closeButton);\r\n }\r\n this._html.contentWrapper.appendChild(this._html.content);\r\n this._html.wrapper.appendChild(this._html.contentWrapper);\r\n\r\n // 5. Create the pointer\r\n if (this._opts.pointer) {\r\n if (this._opts.border) {\r\n this._html.pointerBorder = newElement(\r\n `pointer-${this._opts.position}`,\r\n `pointer-border-${this._opts.position}`\r\n );\r\n this._html.wrapper.appendChild(this._html.pointerBorder);\r\n }\r\n this._html.pointerBg = newElement(\r\n `pointer-${this._opts.position}`,\r\n `pointer-bg-${this._opts.position}`\r\n );\r\n this._html.wrapper.appendChild(this._html.pointerBg);\r\n }\r\n\r\n // Create an outer wrapper\r\n this._html.floatWrapper = newElement(\r\n 'float-wrapper'\r\n );\r\n this._html.floatWrapper.appendChild(this._html.wrapper);\r\n\r\n // Add the wrapper to the Google Maps float pane\r\n this.getPanes().floatPane.appendChild(this._html.floatWrapper);\r\n\r\n // Now add all the event listeners\r\n const map = this.getMap();\r\n this.clearListeners();\r\n if (this._opts.closeOnMapClick) {\r\n this._listeners.push(google.maps.event.addListener(map, 'click', () => {\r\n this.close();\r\n }));\r\n }\r\n if (google) {\r\n // Clear out the previous map bounds\r\n this._previousWidth = null;\r\n this._previousHeight = null;\r\n this._listeners.push(google.maps.event.addListener(map, 'bounds_changed', () => {\r\n const d = map.getDiv();\r\n const ow = d.offsetWidth;\r\n const oh = d.offsetHeight;\r\n const pw = this._previousWidth;\r\n const ph = this._previousHeight;\r\n if (pw === null || ph === null || pw !== ow || ph !== oh) {\r\n this._previousWidth = ow;\r\n this._previousHeight = oh;\r\n this.resize();\r\n }\r\n }));\r\n\r\n // Marker moves\r\n if (this._marker) {\r\n this._listeners.push(google.maps.event.addListener(this._marker,\r\n 'position_changed', () => {\r\n this.draw();\r\n }));\r\n }\r\n\r\n // Close button\r\n if (this._opts.showCloseButton && !this._opts.closeButtonMarkup) {\r\n this._listeners.push(google.maps.event.addDomListener(this._html.closeButton,\r\n 'click', (e) => {\r\n e.cancelBubble = true;\r\n if (e.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n this.close();\r\n }));\r\n }\r\n\r\n // Stop the mouse event propagation\r\n const mouseEvents = ['click', 'dblclick', 'rightclick', 'contextmenu',\r\n 'drag', 'dragend', 'dragstart',\r\n 'mousedown', 'mouseout', 'mouseover', 'mouseup',\r\n 'touchstart', 'touchend', 'touchmove',\r\n 'wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'];\r\n mouseEvents.forEach((event) => {\r\n this._listeners.push(google.maps.event.addDomListener(this._html.wrapper,\r\n event, (e) => {\r\n e.cancelBubble = true;\r\n if (e.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n }));\r\n });\r\n }\r\n\r\n\r\n this.activateCallback('open');\r\n }\r\n\r\n // Implementation of OverlayView onRemove method\r\n onRemove() {\r\n this.activateCallback('close');\r\n if (this._html) {\r\n const parent = this._html.floatWrapper.parentElement;\r\n if (parent) {\r\n parent.removeChild(this._html.floatWrapper);\r\n }\r\n this._html = null;\r\n }\r\n this._isOpen = false;\r\n this.activateCallback('afterClose');\r\n }\r\n\r\n // The map inner bounds used for panning and resizing\r\n getMapInnerBounds() {\r\n const mb = this.getMap().getDiv().getBoundingClientRect();\r\n const mib = {\r\n top: mb.top + this._opts.edgeOffset.top,\r\n right: mb.right - this._opts.edgeOffset.right,\r\n bottom: mb.bottom - this._opts.edgeOffset.bottom,\r\n left: mb.left + this._opts.edgeOffset.left\r\n };\r\n mib.width = mib.right - mib.left;\r\n mib.height = mib.bottom - mib.top;\r\n return mib;\r\n }\r\n\r\n // Pan the google map such that the info window is visible\r\n reposition() {\r\n if (!this._opts.panOnOpen || !this._html) {\r\n return;\r\n }\r\n const mib = this.getMapInnerBounds();\r\n const wb = this._html.wrapper.getBoundingClientRect();\r\n let dx = 0;\r\n let dy = 0;\r\n if (mib.left >= wb.left) {\r\n dx = wb.left - mib.left;\r\n } else if (mib.right <= wb.right) {\r\n dx = wb.left - (mib.right - wb.width);\r\n }\r\n if (mib.top >= wb.top) {\r\n dy = wb.top - mib.top;\r\n } else if (mib.bottom <= wb.bottom) {\r\n dy = wb.top - (mib.bottom - wb.height);\r\n }\r\n if (dx !== 0 || dy !== 0) {\r\n this.getMap().panBy(dx, dy);\r\n }\r\n }\r\n\r\n // Resize the info window to fit within the map bounds and edge offset\r\n resize() {\r\n if (!this._html) {\r\n return;\r\n }\r\n const mib = this.getMapInnerBounds();\r\n // Handle the max width\r\n let maxWidth = mib.width;\r\n if (this._opts.maxWidth !== undefined) {\r\n maxWidth = Math.min(maxWidth, this._opts.maxWidth);\r\n }\r\n maxWidth -= (this._html.wrapper.offsetWidth - this._html.content.offsetWidth);\r\n this._html.content.style.maxWidth = `${maxWidth}px`;\r\n\r\n // Handle the max height\r\n let maxHeight = mib.height;\r\n if (this._opts.maxHeight !== undefined) {\r\n maxHeight = Math.min(maxHeight, this._opts.maxHeight);\r\n }\r\n maxHeight -= (this._html.wrapper.offsetHeight - this._html.content.offsetHeight);\r\n this._html.content.style.maxHeight = `${maxHeight}px`;\r\n }\r\n}\r\n"]} \ No newline at end of file diff --git a/package.json b/package.json index f00dcf5..3d8953e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "snazzy-info-window", "description": "Customizable info windows using the Google Maps JavaScript API.", - "version": "0.0.1", + "version": "1.0.0", "homepage": "https://github.com/atmist/snazzy-info-window", "bugs": { "url": "https://github.com/atmist/snazzy-info-window/issues"