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

juijs-graph

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

juijs-graph - npm Package Compare versions

Comparing version 0.2.1-es6 to 0.2.2-es6

2

bundles/index.js

@@ -7,3 +7,3 @@ import jui from '../src/main.js'

this.draw = function() {
console.log(`FPS:${this.chart.fps}, TPF:${this.chart.tpf}`);
console.log(`FPS:${this.chart.getCache("fps")}, TPF:${this.chart.getCache("tpf")}`);
}

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

{
"name": "juijs-graph",
"version": "0.2.1-es6",
"version": "0.2.2-es6",
"sideEffects": false,

@@ -5,0 +5,0 @@ "description": "SVG-based JUI chart that can be used in the browser and Node.js. Support many types of charts. (Dashboard, Map, Topology, Full 3D)",

@@ -32,2 +32,3 @@ import jui from "juijs"

var _canvas = { main: null, sub: null }; // 캔버스 모드 전용
var _cache = {};

@@ -1052,2 +1053,11 @@ function calculate(self) {

}
this.setCache = function(key, value) {
_cache[key] = value;
}
this.getCache = function(key, defValue) {
if(_cache[key] === undefined) return defValue;
return _cache[key];
}
}

@@ -1054,0 +1064,0 @@

@@ -33,6 +33,8 @@ import JUI from "juijs"

if(currentTime - prevTime > interval || interval == 0){
this.builder.tpf = (currentTime - prevTime) / 1000;
if(this.builder.tpf > 1) this.builder.tpf = 1;
this.builder.fps = (1.0 / this.builder.tpf);
let tpf = (currentTime - prevTime) / 1000;
if(tpf > 1) tpf = 1;
this.builder.setCache("tpf", tpf);
this.builder.setCache("fps", (1.0 / tpf));
this.render();

@@ -39,0 +41,0 @@ if(typeof(callback) == "function") {

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

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