From 6dc5eeb0b540bbc9f70ca4502c8d17866e6b001c Mon Sep 17 00:00:00 2001 From: Amr Wagdy Date: Sat, 19 Mar 2022 16:37:27 +0200 Subject: [PATCH] chore: build v2.7.12 --- CHANGELOG.md | 4 ++ README.md | 2 +- build/js-cloudimage-360-view.min.js | 6 +-- examples/src/index.html | 2 +- package.json | 2 +- src/ci360.service.js | 42 +++++++++++----- src/ci360.utils.js | 1 + src/index.js | 29 +++++++---- src/static/css/hotspots.css | 8 +-- .../hotspots/attach-events/hide-popup.js | 6 +++ .../hotspots/attach-events/show-popup.js | 6 +++ src/utils/hotspots/attach-popup-events.js | 49 ------------------- .../hotspots/elements/create-hotspot-icon.js | 44 ++++++++++++----- .../hotspots/elements/create-hotspots.js | 9 +++- src/utils/hotspots/get-hotspot-popup-node.js | 8 +-- src/utils/hotspots/toggle-popup-events.js | 17 +++++++ src/utils/hotspots/update-hotspots.js | 18 +------ 17 files changed, 138 insertions(+), 115 deletions(-) create mode 100644 src/utils/hotspots/attach-events/hide-popup.js create mode 100644 src/utils/hotspots/attach-events/show-popup.js delete mode 100644 src/utils/hotspots/attach-popup-events.js create mode 100644 src/utils/hotspots/toggle-popup-events.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 92fc20f..a99c9bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,10 @@ Types of changes: - ... ------------- +## 2.7.12 - 2022-03-19 +### Changed +- hotspots init method + ## 2.7.11 - 2022-03-17 ### Fixed - canvas aspect ratio diff --git a/README.md b/README.md index 5c8dd31..562c86a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Release](https://img.shields.io/badge/release-v2.7.11-blue.svg)](https://github.com/scaleflex/js-cloudimage-360-view/releases) +[![Release](https://img.shields.io/badge/release-v2.7.12-blue.svg)](https://github.com/scaleflex/js-cloudimage-360-view/releases) [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)](#contributing) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![Scaleflex team](https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg)](https://www.scaleflex.it/en/home) diff --git a/build/js-cloudimage-360-view.min.js b/build/js-cloudimage-360-view.min.js index d27ec13..ed27b2f 100644 --- a/build/js-cloudimage-360-view.min.js +++ b/build/js-cloudimage-360-view.min.js @@ -1,11 +1,11 @@ /*! * - * js-cloudimage-360-view v2.7.11 + * js-cloudimage-360-view v2.7.12 * https://github.com/scaleflex/js-cloudimage-360-view * * Copyright (c) 2019 scaleflex * Released under the MIT license * - * Date: 2022-03-17T15:31:50.500Z + * Date: 2022-03-19T14:35:33.436Z * - */!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=121)}([function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(64))},function(t,e,n){var i=n(18),r=Function.prototype,o=r.bind,a=r.call,s=i&&o.bind(a,a);t.exports=i?function(t){return t&&s(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},function(t,e,n){t.exports=n(114)},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function n(t,e,n,i,r,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,r)}t.exports=function(t){return function(){var e=this,i=arguments;return new Promise((function(r,o){var a=t.apply(e,i);function s(t){n(a,r,o,s,c,"next",t)}function c(t){n(a,r,o,s,c,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(4);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var i=n(1),r=n(38),o=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(r(t),e)}},function(t,e,n){var i=n(3);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},function(t,e,n){var i=n(0),r=n(37),o=n(8),a=n(39),s=n(34),c=n(33),u=r("wks"),l=i.Symbol,f=l&&l.for,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){if(!o(u,t)||!s&&"string"!=typeof u[t]){var e="Symbol."+t;s&&o(l,t)?u[t]=l[t]:u[t]=c&&f?f(e):d(e)}return u[t]}},function(t,e,n){var i=n(0),r=n(3),o=function(t){return r(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(i[t]):i[t]&&i[t][e]}},function(t,e,n){var i=n(29),r=n(30);t.exports=function(t){return i(r(t))}},function(t,e,n){var i=n(0),r=n(7),o=n(40),a=n(42),s=n(14),c=n(31),u=i.TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor;e.f=r?a?function(t,e,n){if(s(t),e=c(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var i=f(t,e);i&&i.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:i.configurable,enumerable:"enumerable"in n?n.enumerable:i.enumerable,writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(s(t),e=c(e),s(n),o)try{return l(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(0),r=n(9),o=i.String,a=i.TypeError;t.exports=function(t){if(r(t))return t;throw a(o(t)+" is not an object")}},function(t,e,n){var i=n(115),r=n(116),o=n(52),a=n(117);t.exports=function(t){return i(t)||r(t)||o(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,n){var i=n(0),r=n(27).f,o=n(22),a=n(73),s=n(21),c=n(77),u=n(83);t.exports=function(t,e){var n,l,f,d,h,p=t.target,m=t.global,v=t.stat;if(n=m?i:v?i[p]||s(p,{}):(i[p]||{}).prototype)for(l in e){if(d=e[l],f=t.noTargetGet?(h=r(n,l))&&h.value:n[l],!u(m?l:p+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;c(d,f)}(t.sham||f&&f.sham)&&o(d,"sham",!0),a(n,l,d,t)}}},function(t,e,n){var i=n(18),r=Function.prototype.call;t.exports=i?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,n){var i=n(4);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},function(t,e,n){var i=n(1),r=i({}.toString),o=i("".slice);t.exports=function(t){return o(r(t),8,-1)}},function(t,e,n){var i=n(0),r=n(21),o=i["__core-js_shared__"]||r("__core-js_shared__",{});t.exports=o},function(t,e,n){var i=n(0),r=Object.defineProperty;t.exports=function(t,e){try{r(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},function(t,e,n){var i=n(7),r=n(13),o=n(28);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(1),r=n(3),o=n(20),a=i(Function.toString);r(o.inspectSource)||(o.inspectSource=function(t){return a(t)}),t.exports=o.inspectSource},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,n){var i=n(0),r=n(1);t.exports=function(t,e){return r(i[t].prototype[e])}},function(t,e,n){var i=n(7),r=n(17),o=n(65),a=n(28),s=n(12),c=n(31),u=n(8),l=n(40),f=Object.getOwnPropertyDescriptor;e.f=i?f:function(t,e){if(t=s(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return a(!r(o.f,t,e),t[e])}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(0),r=n(1),o=n(4),a=n(19),s=i.Object,c=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?c(t,""):s(t)}:s},function(t,e,n){var i=n(0).TypeError;t.exports=function(t){if(null==t)throw i("Can't call method on "+t);return t}},function(t,e,n){var i=n(66),r=n(32);t.exports=function(t){var e=i(t,"string");return r(e)?e:e+""}},function(t,e,n){var i=n(0),r=n(11),o=n(3),a=n(67),s=n(33),c=i.Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&a(e.prototype,c(t))}},function(t,e,n){var i=n(34);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var i=n(35),r=n(4);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},function(t,e,n){var i,r,o=n(0),a=n(68),s=o.process,c=o.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(r=(i=l.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!r&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(r=+i[1]),t.exports=r},function(t,e,n){var i=n(0),r=n(3),o=n(70),a=i.TypeError;t.exports=function(t){if(r(t))return t;throw a(o(t)+" is not a function")}},function(t,e,n){var i=n(72),r=n(20);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.21.0",mode:i?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.0/LICENSE",source:"https://github.com/zloirock/core-js"})},function(t,e,n){var i=n(0),r=n(30),o=i.Object;t.exports=function(t){return o(r(t))}},function(t,e,n){var i=n(1),r=0,o=Math.random(),a=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++r+o,36)}},function(t,e,n){var i=n(7),r=n(4),o=n(41);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var i=n(0),r=n(9),o=i.document,a=r(o)&&r(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},function(t,e,n){var i=n(7),r=n(4);t.exports=i&&r((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},function(t,e,n){var i=n(37),r=n(39),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},function(t,e,n){var i=n(1),r=n(8),o=n(12),a=n(45).indexOf,s=n(24),c=i([].push);t.exports=function(t,e){var n,i=o(t),u=0,l=[];for(n in i)!r(s,n)&&r(i,n)&&c(l,n);for(;e.length>u;)r(i,n=e[u++])&&(~a(l,n)||c(l,n));return l}},function(t,e,n){var i=n(12),r=n(80),o=n(47),a=function(t){return function(e,n,a){var s,c=i(e),u=o(c),l=r(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?i:n)(e)}},function(t,e,n){var i=n(81);t.exports=function(t){return i(t.length)}},function(t,e,n){var i=n(85),r=n(1),o=n(29),a=n(38),s=n(47),c=n(86),u=r([].push),l=function(t){var e=1==t,n=2==t,r=3==t,l=4==t,f=6==t,d=7==t,h=5==t||f;return function(p,m,v,g){for(var y,b,w=a(p),x=o(w),I=i(m,v),O=s(x),k=0,E=g||c,S=e?E(p,O):n||d?E(p,0):void 0;O>k;k++)if((h||k in x)&&(b=I(y=x[k],k,w),t))if(e)S[k]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return k;case 2:u(S,y)}else switch(t){case 4:return!1;case 7:u(S,y)}return f?-1:r||l?l:S}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var r=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[n].concat(o).concat([r]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;r=0&&f.splice(e,1)}function g(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var i=function(){0;return n.nc}();i&&(t.attrs.nonce=i)}return y(e,t.attrs),m(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function b(t,e){var n,i,r,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var a=l++;n=u||(u=g(e)),i=I.bind(null,n,a,!1),r=I.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),m(t,e),e}(e),i=k.bind(null,n,e),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(e),i=O.bind(null,n),r=function(){v(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return h(n,e),function(t){for(var i=[],r=0;rt.length)&&(e=t.length);for(var n=0,i=new Array(e);n0?r(i(t),9007199254740991):0}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(4),r=n(3),o=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n==l||n!=u&&(r(e)?i(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=a.data={},u=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},function(t,e,n){"use strict";var i=n(48).forEach,r=n(92)("forEach");t.exports=r?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var i=n(1),r=n(36),o=n(18),a=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(87);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},function(t,e,n){var i=n(0),r=n(88),o=n(89),a=n(9),s=n(10)("species"),c=i.Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(o(e)&&(e===c||r(e.prototype))||a(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?c:e}},function(t,e,n){var i=n(19);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(1),r=n(4),o=n(3),a=n(90),s=n(11),c=n(23),u=function(){},l=[],f=s("Reflect","construct"),d=/^\s*(?:class|function)\b/,h=i(d.exec),p=!d.exec(u),m=function(t){if(!o(t))return!1;try{return f(u,l,t),!0}catch(t){return!1}},v=function(t){if(!o(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!h(d,c(t))}catch(t){return!0}};v.sham=!0,t.exports=!f||r((function(){var t;return m(m.call)||!m(Object)||!m((function(){t=!0}))||t}))?v:m},function(t,e,n){var i=n(0),r=n(91),o=n(3),a=n(19),s=n(10)("toStringTag"),c=i.Object,u="Arguments"==a(function(){return arguments}());t.exports=r?a:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),s))?n:u?a(e):"Object"==(i=a(e))&&o(e.callee)?"Arguments":i}},function(t,e,n){var i={};i[n(10)("toStringTag")]="z",t.exports="[object z]"===String(i)},function(t,e,n){"use strict";var i=n(4);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){var i=n(94);t.exports=i},function(t,e,n){var i=n(95);t.exports=i},function(t,e,n){var i=n(96);t.exports=i},function(t,e,n){n(97);var i=n(26);t.exports=i("Array","filter")},function(t,e,n){"use strict";var i=n(16),r=n(48).filter;i({target:"Array",proto:!0,forced:!n(98)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var i=n(4),r=n(10),o=n(35),a=r("species");t.exports=function(t){return o>=51||!i((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,n){var i=n(100);t.exports=i},function(t,e,n){var i=n(101);t.exports=i},function(t,e,n){var i=n(102);t.exports=i},function(t,e,n){n(103);var i=n(26);t.exports=i("Array","includes")},function(t,e,n){"use strict";var i=n(16),r=n(45).includes,o=n(104);i({target:"Array",proto:!0},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(t,e,n){var i=n(10),r=n(105),o=n(13),a=i("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:r(null)}),t.exports=function(t){s[a][t]=!0}},function(t,e,n){var i,r=n(14),o=n(106),a=n(25),s=n(24),c=n(108),u=n(41),l=n(43),f=l("IE_PROTO"),d=function(){},h=function(t){return"