Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-mobile

Package Overview
Dependencies
Maintainers
58
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-mobile - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6-alpha.0

2

dist/index.umd.min.js

@@ -15,2 +15,2 @@ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@antv/g")):"function"==typeof define&&define.amd?define(["@antv/g"],e):"object"==typeof exports?exports.MobileCanvas2D=e(require("@antv/g")):(t.G=t.G||{},t.G.MobileCanvas2D=e(t.G))}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},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=3)}([function(e,n){e.exports=t},function(t,e,n){"use strict";

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.create;Object.create;var i=n(0);function c(t,e){if(t.currentStyle)return t.currentStyle[e];window&&window.document&&document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function s(t,e){var n,r;return t.canvas.width=(n=t.canvas,"auto"===(r=c(n,"width"))&&(r=n.offsetWidth),parseFloat(r)*e||t.canvas.width||0),t.canvas.height=function(t){var e=c(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}(t.canvas)*e||t.canvas.height||0,t}var a=n(2),u=function(){function t(t){this.isCanvasElement=!0,this.emitter=new a.EventEmitter,this.context=t;var e=t.canvas||{};this.width=e.width||0,this.height=e.height||0}return t.prototype.getContext=function(){return this.context},t.prototype.getBoundingClientRect=function(){var t=this.width,e=this.height;return{top:0,right:t,bottom:e,left:0,width:t,height:e,x:0,y:0}},t.prototype.addEventListener=function(t,e){this.emitter.on(t,e)},t.prototype.removeEventListener=function(t,e){this.emitter.off(t,e)},t.prototype.dispatchEvent=function(t,e){this.emitter.emit(t,e)},t}();var f=function(t){return t?function(t){if(!t)return!1;if(1!==t.nodeType||!t.nodeName||"canvas"!==t.nodeName.toLowerCase())return!1;var e=!1;try{t.addEventListener("eventTest",(function(){e=!0})),t.dispatchEvent(new Event("eventTest"))}catch(t){e=!1}return e}(t.canvas)?t.canvas:new u(t):null},l=function(t){function e(e){var n,r=e.context,i=e.devicePixelRatio;if(r){var c=s(r,i);n=f(c)}return t.call(this,o(o({},e),{canvas:n,devicePixelRatio:i}))||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(i.Canvas);e.a=l},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function i(){}function c(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new c(n,r||t,i),a=o?o+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=o?o+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,c=new Array(i);r<i;r++)c[r]=n[r].fn;return c},u.prototype.listenerCount=function(t){var e=o?o+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,r,i,c){var s=o?o+t:t;if(!this._events[s])return!1;var a,u,f=this._events[s],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,r),!0;case 5:return f.fn.call(f.context,e,n,r,i),!0;case 6:return f.fn.call(f.context,e,n,r,i,c),!0}for(u=1,a=new Array(l-1);u<l;u++)a[u-1]=arguments[u];f.fn.apply(f.context,a)}else{var p,v=f.length;for(u=0;u<v;u++)switch(f[u].once&&this.removeListener(t,f[u].fn,void 0,!0),l){case 1:f[u].fn.call(f[u].context);break;case 2:f[u].fn.call(f[u].context,e);break;case 3:f[u].fn.call(f[u].context,e,n);break;case 4:f[u].fn.call(f[u].context,e,n,r);break;default:if(!a)for(p=1,a=new Array(l-1);p<l;p++)a[p-1]=arguments[p];f[u].fn.apply(f[u].context,a)}}return!0},u.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,r){var i=o?o+t:t;if(!this._events[i])return this;if(!e)return a(this,i),this;var c=this._events[i];if(c.fn)c.fn!==e||r&&!c.once||n&&c.context!==n||a(this,i);else{for(var s=0,u=[],f=c.length;s<f;s++)(c[s].fn!==e||r&&!c[s].once||n&&c[s].context!==n)&&u.push(c[s]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=o,u.EventEmitter=u,t.exports=u},function(t,e,n){"use strict";n.r(e);var r=n(0);for(var o in r)["default","Canvas"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var i=n(1);n.d(e,"Canvas",(function(){return i.a}))}])}));
***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};Object.create;Object.create;var i=n(0);function c(t,e){return t.currentStyle?t.currentStyle[e]:window&&window.document?document.defaultView.getComputedStyle(t,null).getPropertyValue(e):void 0}function s(t,e){var n,r;return t.canvas.width=(n=t.canvas,"auto"===(r=c(n,"width"))&&(r=n.offsetWidth),parseFloat(r)*e||t.canvas.width||0),t.canvas.height=function(t){var e=c(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}(t.canvas)*e||t.canvas.height||0,t}var a=n(2),u=function(){function t(t){this.isCanvasElement=!0,this.emitter=new a.EventEmitter,this.context=t;var e=t.canvas||{};this.width=e.width||0,this.height=e.height||0}return t.prototype.getContext=function(){return this.context},t.prototype.getBoundingClientRect=function(){var t=this.width,e=this.height;return{top:0,right:t,bottom:e,left:0,width:t,height:e,x:0,y:0}},t.prototype.addEventListener=function(t,e){this.emitter.on(t,e)},t.prototype.removeEventListener=function(t,e){this.emitter.off(t,e)},t.prototype.dispatchEvent=function(t,e){this.emitter.emit(t,e)},t}();var f=function(t){return t?function(t){if(!t)return!1;if(1!==t.nodeType||!t.nodeName||"canvas"!==t.nodeName.toLowerCase())return!1;var e=!1;try{t.addEventListener("eventTest",(function(){e=!0})),t.dispatchEvent(new Event("eventTest"))}catch(t){e=!1}return e}(t.canvas)?t.canvas:new u(t):null},l=function(t){function e(e){var n,r=e.context,i=e.devicePixelRatio;if(r){var c=s(r,i);n=f(c)}return t.call(this,o(o({},e),{canvas:n,devicePixelRatio:i}))||this}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(i.Canvas);e.a=l},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function i(){}function c(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new c(n,r||t,i),a=o?o+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(o=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(o?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=o?o+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,i=n.length,c=new Array(i);r<i;r++)c[r]=n[r].fn;return c},u.prototype.listenerCount=function(t){var e=o?o+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,r,i,c){var s=o?o+t:t;if(!this._events[s])return!1;var a,u,f=this._events[s],l=arguments.length;if(f.fn){switch(f.once&&this.removeListener(t,f.fn,void 0,!0),l){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,e),!0;case 3:return f.fn.call(f.context,e,n),!0;case 4:return f.fn.call(f.context,e,n,r),!0;case 5:return f.fn.call(f.context,e,n,r,i),!0;case 6:return f.fn.call(f.context,e,n,r,i,c),!0}for(u=1,a=new Array(l-1);u<l;u++)a[u-1]=arguments[u];f.fn.apply(f.context,a)}else{var v,p=f.length;for(u=0;u<p;u++)switch(f[u].once&&this.removeListener(t,f[u].fn,void 0,!0),l){case 1:f[u].fn.call(f[u].context);break;case 2:f[u].fn.call(f[u].context,e);break;case 3:f[u].fn.call(f[u].context,e,n);break;case 4:f[u].fn.call(f[u].context,e,n,r);break;default:if(!a)for(v=1,a=new Array(l-1);v<l;v++)a[v-1]=arguments[v];f[u].fn.apply(f[u].context,a)}}return!0},u.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,r){var i=o?o+t:t;if(!this._events[i])return this;if(!e)return a(this,i),this;var c=this._events[i];if(c.fn)c.fn!==e||r&&!c.once||n&&c.context!==n||a(this,i);else{for(var s=0,u=[],f=c.length;s<f;s++)(c[s].fn!==e||r&&!c[s].once||n&&c[s].context!==n)&&u.push(c[s]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=o?o+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=o,u.EventEmitter=u,t.exports=u},function(t,e,n){"use strict";n.r(e);var r=n(0);for(var o in r)["default","Canvas"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);var i=n(1);n.d(e,"Canvas",(function(){return i.a}))}])}));

@@ -7,3 +7,3 @@ function getStyle(el, property) {

if (window && window.document) {
document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
return document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
}

@@ -10,0 +10,0 @@ }

@@ -14,3 +14,3 @@ "use strict";

if (window && window.document) {
document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
return document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
}

@@ -17,0 +17,0 @@ }

{
"name": "@antv/g-mobile",
"version": "1.0.5",
"version": "1.0.6-alpha.0",
"description": "A renderer implemented with Canvas2D API in mobile environment",

@@ -50,3 +50,3 @@ "main": "lib/index.js",

},
"gitHead": "cc8e74c562a0cb5b5fab1063510c4c9fc9aae360"
"gitHead": "165c34e1ec5e28cdf6e52b996fdd6a0d8d0f2609"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc