@meta2d/le5le-charts
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@meta2d/le5le-charts", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "The le5le-charts library based on le5le meta2d.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,1 +1,2 @@ | ||
/// <reference types="node" /> | ||
import { Pen } from '../../core/src/pen'; | ||
@@ -37,2 +38,3 @@ export declare function getValidValue(num: any, value: number): any; | ||
replaceMode?: ReplaceMode; | ||
clockInterval?: NodeJS.Timer; | ||
} |
@@ -14,3 +14,2 @@ var __assign = (this && this.__assign) || function () { | ||
//仪表全盘 | ||
var clockInterval; | ||
export function gauge(ctx, pen) { | ||
@@ -20,2 +19,3 @@ if (!pen.onAdd) { | ||
pen.onDestroy = onDestroy; | ||
pen.onClick = onclick; | ||
} | ||
@@ -249,3 +249,3 @@ var x = pen.calculative.worldRect.x; | ||
if (pen.isClock) { | ||
clockInterval = setInterval(function () { | ||
pen.clockInterval = setInterval(function () { | ||
var date = new Date(); | ||
@@ -282,4 +282,13 @@ var second = date.getSeconds(); | ||
function onDestroy(pen) { | ||
clearInterval(clockInterval); | ||
if (pen.clockInterval) { | ||
clearInterval(pen.clockInterval); | ||
pen.clockInterval = undefined; | ||
} | ||
} | ||
function onclick(pen) { | ||
if (pen.isClock) { | ||
pen.onDestroy(pen); | ||
pen.onAdd(pen); | ||
} | ||
} | ||
//# sourceMappingURL=gauge.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86311
1228