better production detection, fix version injection

This commit is contained in:
Anton Lavrenov
2019-04-05 08:14:05 -05:00
parent 49ceea1dfc
commit 03d7ceef5a
6 changed files with 18 additions and 94 deletions

View File

@@ -86,18 +86,10 @@ export const glob: any =
? self
: {};
export namespace Konva2 {
export const version = '@@version';
}
export const Konva = {
version: '@@version',
isBrowser: detectBrowser(),
isUnminified: /comment/.test(
function() {
/* comment */
}.toString()
),
isUnminified: /param/.test(function(param) {}.toString()),
dblClickWindow: 400,
getAngle(angle) {
return Konva.angleDeg ? angle * PI_OVER_180 : angle;

View File

@@ -36,6 +36,8 @@ declare namespace Konva {
export const isDragging: () => boolean;
export const isDragReady: () => boolean;
export type Vector2d = import('./types').Vector2d;
export const Node: typeof import('./Node').Node;
export type Node = import('./Node').Node;
export type NodeConfig = import('./Node').NodeConfig;