🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

light-chart

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

light-chart - npm Package Compare versions

Comparing version
0.0.7
to
0.0.8
dist/light-chart.min.js

Sorry, the diff of this file is too big to display

+2
-2
{
"name": "light-chart",
"version": "0.0.7",
"version": "0.0.8",
"description": "Charts for mobile visualization.",

@@ -16,3 +16,3 @@ "keywords": [

],
"main": "adapt/f2.js",
"main": "dist/light-chart.min.js",
"homepage": "https://github.com/antvis/f2",

@@ -19,0 +19,0 @@ "author": "https://github.com/orgs/antvis/people",

import F2 from "./index"
let G2Chart=F2.Chart;
F2.Chart=function(config){
if(config.ltCanvas){
const context =require("./canvas/index").getContext(config.ltCanvas.$refs.canvas);
config.ltCanvas.$refs.canvas.getContext = function () {
return context;
};
if(process.env.RUNTIME === "native"){
config.el = new F2.Renderer(context);
Object.defineProperties(config.el, {
'currentStyle': {
get: function () {
return Object.assign({}, config.ltCanvas.$refs.canvasWrap.classStyle, config.ltCanvas.$refs.canvasWrap.style);
}
},
'offsetWidth': {
get: function () {
return parseFloat(config.ltCanvas.$refs.canvasWrap.classStyle['width'] || config.ltCanvas.$refs.canvasWrap.style['width']);
}
},
'offsetHeight': {
get: function () {
return parseFloat(config.ltCanvas.$refs.canvasWrap.classStyle['height'] || config.ltCanvas.$refs.canvasWrap.style['height'])
}
}
});
}else{
config.el = config.ltCanvas.$refs.canvas;
}
config.width = +config.ltCanvas.$refs.canvas.offsetWidth;
config.height = +config.ltCanvas.$refs.canvas.offsetHeight;
}
return new G2Chart(config);
};
// module.exports = F2;
export default F2;