@graspologic/common
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.DEFAULT_AUTO_BIND = exports.DEFAULT_CAMERA_MODE = exports.DEFAULT_SCALE_VIEW_ON_INIT = exports.DEFAULT_USE_DEVICE_PIXELS = exports.DEFAULT_HEIGHT = exports.DEFAULT_WIDTH = exports.DEFAULT_EDGE_COUNT_HINT = exports.DEFAULT_NODE_COUNT_HINT = exports.DEFAULT_NODE_FILTERED_IN_SATURATION = exports.DEFAULT_NODE_FILTERED_OUT_SATURATION = exports.DEFAULT_NODE_OUTLINE = exports.DEFAULT_NODE_MAX_RADIUS = exports.DEFAULT_NODE_MIN_RADIUS = exports.DEFAULT_EDGE_FILTERED_IN_SATURATION = exports.DEFAULT_EDGE_FILTERED_OUT_SATURATION = exports.DEFAULT_EDGE_MAX_WIDTH = exports.DEFAULT_EDGE_MIN_WIDTH = exports.DEFAULT_EDGE_ALPHA = exports.DEFAULT_EDGE_ANTIALIAS = exports.DEFAULT_EDGE_DEPTH_WRITE = exports.DEFAULT_EDGE_CONSTANT_WIDTH = exports.DEFAULT_CORNER_AXES = exports.DEFAULT_DRAW_AXES = exports.DEFAULT_HOVER_HIGHLIGHT_COLOR = exports.DEFAULT_INTERPOLATION_TIME = exports.DEFAULT_IS_3D = exports.DEFAULT_HIDE_DESELECTED = exports.DEFAULT_HIDE_NODES_ON_MOVE = exports.DEFAULT_DRAW_NODES = exports.DEFAULT_HIDE_EDGES_ON_MOVE = exports.DEFAULT_DRAW_EDGES = exports.DEFAULT_BG_COLOR = void 0; | ||
exports.DEFAULT_AUTO_BIND = exports.DEFAULT_CAMERA_MODE = exports.DEFAULT_SCALE_VIEW_ON_INIT = exports.DEFAULT_USE_DEVICE_PIXELS = exports.DEFAULT_BOUNDS = exports.DEFAULT_HEIGHT = exports.DEFAULT_WIDTH = exports.DEFAULT_EDGE_COUNT_HINT = exports.DEFAULT_NODE_COUNT_HINT = exports.DEFAULT_NODE_FILTERED_IN_SATURATION = exports.DEFAULT_NODE_FILTERED_OUT_SATURATION = exports.DEFAULT_NODE_OUTLINE = exports.DEFAULT_NODE_MAX_RADIUS = exports.DEFAULT_NODE_MIN_RADIUS = exports.DEFAULT_EDGE_FILTERED_IN_SATURATION = exports.DEFAULT_EDGE_FILTERED_OUT_SATURATION = exports.DEFAULT_EDGE_MAX_WIDTH = exports.DEFAULT_EDGE_MIN_WIDTH = exports.DEFAULT_EDGE_ALPHA = exports.DEFAULT_EDGE_ANTIALIAS = exports.DEFAULT_EDGE_DEPTH_WRITE = exports.DEFAULT_EDGE_CONSTANT_WIDTH = exports.DEFAULT_CORNER_AXES = exports.DEFAULT_DRAW_AXES = exports.DEFAULT_HOVER_HIGHLIGHT_COLOR = exports.DEFAULT_INTERPOLATION_TIME = exports.DEFAULT_IS_3D = exports.DEFAULT_HIDE_DESELECTED = exports.DEFAULT_HIDE_NODES_ON_MOVE = exports.DEFAULT_DRAW_NODES = exports.DEFAULT_HIDE_EDGES_ON_MOVE = exports.DEFAULT_DRAW_EDGES = exports.DEFAULT_BG_COLOR = void 0; | ||
@@ -72,2 +72,4 @@ var _types = require("./types"); | ||
exports.DEFAULT_HEIGHT = DEFAULT_HEIGHT; | ||
const DEFAULT_BOUNDS = undefined; | ||
exports.DEFAULT_BOUNDS = DEFAULT_BOUNDS; | ||
const DEFAULT_USE_DEVICE_PIXELS = true; | ||
@@ -74,0 +76,0 @@ exports.DEFAULT_USE_DEVICE_PIXELS = DEFAULT_USE_DEVICE_PIXELS; |
@@ -51,3 +51,4 @@ "use strict"; | ||
this._width = new _utils.PropertyContainer(_defaults.DEFAULT_WIDTH); | ||
this._height = new _utils.PropertyContainer(_defaults.DEFAULT_HEIGHT); // Axis Properties | ||
this._height = new _utils.PropertyContainer(_defaults.DEFAULT_HEIGHT); | ||
this._dataBounds = new _utils.PropertyContainer(_defaults.DEFAULT_BOUNDS); // Axis Properties | ||
@@ -171,2 +172,14 @@ this._cornerAxes = new _utils.PropertyContainer(_defaults.DEFAULT_CORNER_AXES); | ||
get dataBounds() { | ||
return this._dataBounds.value; | ||
} | ||
set dataBounds(value) { | ||
this._dataBounds.value = value; | ||
} | ||
onDataBoundsChanged(handler) { | ||
return this._dataBounds.on('change', handler); | ||
} | ||
get edgeAntialias() { | ||
@@ -468,3 +481,4 @@ return this._edgeAntialias.value; | ||
cameraAdjustmentMode, | ||
autoBind | ||
autoBind, | ||
dataBounds | ||
} = this; | ||
@@ -502,3 +516,4 @@ return { | ||
cameraAdjustmentMode, | ||
autoBind | ||
autoBind, | ||
dataBounds | ||
}; | ||
@@ -505,0 +520,0 @@ } |
@@ -35,2 +35,3 @@ /*! | ||
export const DEFAULT_HEIGHT = 500; | ||
export const DEFAULT_BOUNDS = undefined; | ||
export const DEFAULT_USE_DEVICE_PIXELS = true; | ||
@@ -37,0 +38,0 @@ export const DEFAULT_SCALE_VIEW_ON_INIT = true; |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { DEFAULT_DRAW_EDGES, DEFAULT_HIDE_EDGES_ON_MOVE, DEFAULT_DRAW_NODES, DEFAULT_HIDE_NODES_ON_MOVE, DEFAULT_HIDE_DESELECTED, DEFAULT_IS_3D, DEFAULT_BG_COLOR, DEFAULT_EDGE_CONSTANT_WIDTH, DEFAULT_EDGE_DEPTH_WRITE, DEFAULT_EDGE_ANTIALIAS, DEFAULT_EDGE_ALPHA, DEFAULT_EDGE_MIN_WIDTH, DEFAULT_EDGE_MAX_WIDTH, DEFAULT_EDGE_FILTERED_OUT_SATURATION, DEFAULT_EDGE_FILTERED_IN_SATURATION, DEFAULT_NODE_MIN_RADIUS, DEFAULT_NODE_MAX_RADIUS, DEFAULT_NODE_OUTLINE, DEFAULT_NODE_FILTERED_OUT_SATURATION, DEFAULT_NODE_FILTERED_IN_SATURATION, DEFAULT_CORNER_AXES, DEFAULT_DRAW_AXES, DEFAULT_INTERPOLATION_TIME, DEFAULT_HOVER_HIGHLIGHT_COLOR, DEFAULT_NODE_COUNT_HINT, DEFAULT_EDGE_COUNT_HINT, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_CAMERA_MODE, DEFAULT_AUTO_BIND } from './defaults'; | ||
import { DEFAULT_DRAW_EDGES, DEFAULT_HIDE_EDGES_ON_MOVE, DEFAULT_DRAW_NODES, DEFAULT_HIDE_NODES_ON_MOVE, DEFAULT_HIDE_DESELECTED, DEFAULT_IS_3D, DEFAULT_BG_COLOR, DEFAULT_EDGE_CONSTANT_WIDTH, DEFAULT_EDGE_DEPTH_WRITE, DEFAULT_EDGE_ANTIALIAS, DEFAULT_EDGE_ALPHA, DEFAULT_EDGE_MIN_WIDTH, DEFAULT_EDGE_MAX_WIDTH, DEFAULT_EDGE_FILTERED_OUT_SATURATION, DEFAULT_EDGE_FILTERED_IN_SATURATION, DEFAULT_NODE_MIN_RADIUS, DEFAULT_NODE_MAX_RADIUS, DEFAULT_NODE_OUTLINE, DEFAULT_NODE_FILTERED_OUT_SATURATION, DEFAULT_NODE_FILTERED_IN_SATURATION, DEFAULT_CORNER_AXES, DEFAULT_DRAW_AXES, DEFAULT_INTERPOLATION_TIME, DEFAULT_HOVER_HIGHLIGHT_COLOR, DEFAULT_NODE_COUNT_HINT, DEFAULT_EDGE_COUNT_HINT, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_CAMERA_MODE, DEFAULT_AUTO_BIND, DEFAULT_BOUNDS } from './defaults'; | ||
import { PropertyContainer, areColorsEqual } from './utils'; // TODO: These need to be documented | ||
@@ -43,3 +43,4 @@ // TODO: Theres got to be a way to auto gen this stuff | ||
this._width = new PropertyContainer(DEFAULT_WIDTH); | ||
this._height = new PropertyContainer(DEFAULT_HEIGHT); // Axis Properties | ||
this._height = new PropertyContainer(DEFAULT_HEIGHT); | ||
this._dataBounds = new PropertyContainer(DEFAULT_BOUNDS); // Axis Properties | ||
@@ -163,2 +164,14 @@ this._cornerAxes = new PropertyContainer(DEFAULT_CORNER_AXES); | ||
get dataBounds() { | ||
return this._dataBounds.value; | ||
} | ||
set dataBounds(value) { | ||
this._dataBounds.value = value; | ||
} | ||
onDataBoundsChanged(handler) { | ||
return this._dataBounds.on('change', handler); | ||
} | ||
get edgeAntialias() { | ||
@@ -460,3 +473,4 @@ return this._edgeAntialias.value; | ||
cameraAdjustmentMode, | ||
autoBind | ||
autoBind, | ||
dataBounds | ||
} = this; | ||
@@ -494,3 +508,4 @@ return { | ||
cameraAdjustmentMode, | ||
autoBind | ||
autoBind, | ||
dataBounds | ||
}; | ||
@@ -497,0 +512,0 @@ } |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { ColorVector, CameraAdjustmentMode } from './types'; | ||
import { ColorVector, CameraAdjustmentMode, Bounds3D } from './types'; | ||
export declare const DEFAULT_BG_COLOR: ColorVector; | ||
@@ -35,2 +35,3 @@ export declare const DEFAULT_DRAW_EDGES = true; | ||
export declare const DEFAULT_HEIGHT = 500; | ||
export declare const DEFAULT_BOUNDS: Bounds3D | undefined; | ||
export declare const DEFAULT_USE_DEVICE_PIXELS: number | boolean; | ||
@@ -37,0 +38,0 @@ export declare const DEFAULT_SCALE_VIEW_ON_INIT = true; |
@@ -196,2 +196,6 @@ /*! | ||
autoBind: boolean; | ||
/** | ||
* The known bounds of the graph, setting this can speed up rendering | ||
*/ | ||
dataBounds: Maybe<Bounds>; | ||
} | ||
@@ -244,7 +248,2 @@ export interface NumberRange { | ||
* @internal | ||
* The current interpolation percentage for the camera transitioning from 3d to 2d | ||
*/ | ||
interpolation: number; | ||
/** | ||
* @internal | ||
* If true, deselected nodes should be hidden | ||
@@ -298,2 +297,6 @@ */ | ||
time: number; | ||
/** | ||
* If true, rendering should be forced | ||
*/ | ||
forceRender: boolean; | ||
} | ||
@@ -300,0 +303,0 @@ export interface ItemBasedRenderable { |
@@ -20,3 +20,3 @@ // Generated by dts-bundle v0.7.3 | ||
declare module '@graspologic/common/defaults' { | ||
import { ColorVector, CameraAdjustmentMode } from '@graspologic/common/types'; | ||
import { ColorVector, CameraAdjustmentMode, Bounds3D } from '@graspologic/common/types'; | ||
export const DEFAULT_BG_COLOR: ColorVector; | ||
@@ -50,2 +50,3 @@ export const DEFAULT_DRAW_EDGES = true; | ||
export const DEFAULT_HEIGHT = 500; | ||
export const DEFAULT_BOUNDS: Bounds3D | undefined; | ||
export const DEFAULT_USE_DEVICE_PIXELS: number | boolean; | ||
@@ -256,2 +257,6 @@ export const DEFAULT_SCALE_VIEW_ON_INIT = true; | ||
autoBind: boolean; | ||
/** | ||
* The known bounds of the graph, setting this can speed up rendering | ||
*/ | ||
dataBounds: Maybe<Bounds>; | ||
} | ||
@@ -304,7 +309,2 @@ export interface NumberRange { | ||
* @internal | ||
* The current interpolation percentage for the camera transitioning from 3d to 2d | ||
*/ | ||
interpolation: number; | ||
/** | ||
* @internal | ||
* If true, deselected nodes should be hidden | ||
@@ -358,2 +358,6 @@ */ | ||
time: number; | ||
/** | ||
* If true, rendering should be forced | ||
*/ | ||
forceRender: boolean; | ||
} | ||
@@ -360,0 +364,0 @@ export interface ItemBasedRenderable { |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { ColorVector, CameraAdjustmentMode } from './types'; | ||
import { ColorVector, CameraAdjustmentMode, Bounds3D } from './types'; | ||
export declare const DEFAULT_BG_COLOR: ColorVector; | ||
@@ -35,2 +35,3 @@ export declare const DEFAULT_DRAW_EDGES = true; | ||
export declare const DEFAULT_HEIGHT = 500; | ||
export declare const DEFAULT_BOUNDS: Bounds3D | undefined; | ||
export declare const DEFAULT_USE_DEVICE_PIXELS: number | boolean; | ||
@@ -37,0 +38,0 @@ export declare const DEFAULT_SCALE_VIEW_ON_INIT = true; |
@@ -40,2 +40,3 @@ /*! | ||
export const DEFAULT_HEIGHT = 500; | ||
export const DEFAULT_BOUNDS = undefined; | ||
export const DEFAULT_USE_DEVICE_PIXELS = true; | ||
@@ -42,0 +43,0 @@ export const DEFAULT_SCALE_VIEW_ON_INIT = true; |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { DEFAULT_DRAW_EDGES, DEFAULT_HIDE_EDGES_ON_MOVE, DEFAULT_DRAW_NODES, DEFAULT_HIDE_NODES_ON_MOVE, DEFAULT_HIDE_DESELECTED, DEFAULT_IS_3D, DEFAULT_BG_COLOR, DEFAULT_EDGE_CONSTANT_WIDTH, DEFAULT_EDGE_DEPTH_WRITE, DEFAULT_EDGE_ANTIALIAS, DEFAULT_EDGE_ALPHA, DEFAULT_EDGE_MIN_WIDTH, DEFAULT_EDGE_MAX_WIDTH, DEFAULT_EDGE_FILTERED_OUT_SATURATION, DEFAULT_EDGE_FILTERED_IN_SATURATION, DEFAULT_NODE_MIN_RADIUS, DEFAULT_NODE_MAX_RADIUS, DEFAULT_NODE_OUTLINE, DEFAULT_NODE_FILTERED_OUT_SATURATION, DEFAULT_NODE_FILTERED_IN_SATURATION, DEFAULT_CORNER_AXES, DEFAULT_DRAW_AXES, DEFAULT_INTERPOLATION_TIME, DEFAULT_HOVER_HIGHLIGHT_COLOR, DEFAULT_NODE_COUNT_HINT, DEFAULT_EDGE_COUNT_HINT, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_CAMERA_MODE, DEFAULT_AUTO_BIND, } from './defaults'; | ||
import { DEFAULT_DRAW_EDGES, DEFAULT_HIDE_EDGES_ON_MOVE, DEFAULT_DRAW_NODES, DEFAULT_HIDE_NODES_ON_MOVE, DEFAULT_HIDE_DESELECTED, DEFAULT_IS_3D, DEFAULT_BG_COLOR, DEFAULT_EDGE_CONSTANT_WIDTH, DEFAULT_EDGE_DEPTH_WRITE, DEFAULT_EDGE_ANTIALIAS, DEFAULT_EDGE_ALPHA, DEFAULT_EDGE_MIN_WIDTH, DEFAULT_EDGE_MAX_WIDTH, DEFAULT_EDGE_FILTERED_OUT_SATURATION, DEFAULT_EDGE_FILTERED_IN_SATURATION, DEFAULT_NODE_MIN_RADIUS, DEFAULT_NODE_MAX_RADIUS, DEFAULT_NODE_OUTLINE, DEFAULT_NODE_FILTERED_OUT_SATURATION, DEFAULT_NODE_FILTERED_IN_SATURATION, DEFAULT_CORNER_AXES, DEFAULT_DRAW_AXES, DEFAULT_INTERPOLATION_TIME, DEFAULT_HOVER_HIGHLIGHT_COLOR, DEFAULT_NODE_COUNT_HINT, DEFAULT_EDGE_COUNT_HINT, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_CAMERA_MODE, DEFAULT_AUTO_BIND, DEFAULT_BOUNDS, } from './defaults'; | ||
import { PropertyContainer, areColorsEqual, } from './utils'; | ||
@@ -43,2 +43,3 @@ // TODO: These need to be documented | ||
this._height = new PropertyContainer(DEFAULT_HEIGHT); | ||
this._dataBounds = new PropertyContainer(DEFAULT_BOUNDS); | ||
// Axis Properties | ||
@@ -134,2 +135,11 @@ this._cornerAxes = new PropertyContainer(DEFAULT_CORNER_AXES); | ||
} | ||
get dataBounds() { | ||
return this._dataBounds.value; | ||
} | ||
set dataBounds(value) { | ||
this._dataBounds.value = value; | ||
} | ||
onDataBoundsChanged(handler) { | ||
return this._dataBounds.on('change', handler); | ||
} | ||
get edgeAntialias() { | ||
@@ -334,3 +344,3 @@ return this._edgeAntialias.value; | ||
copy() { | ||
const { backgroundColor, cornerAxes, drawAxes, drawEdges, drawNodes, edgeAlpha, edgeAntialias, edgeConstantWidth, edgeDepthWrite, edgeFilteredInSaturation, edgeFilteredOutSaturation, edgeMaxWidth, edgeMinWidth, hideDeselected, hideEdgesOnMove, hideNodesOnMove, hoverHighlightColor, interpolationTime, is3D, nodeFilteredIds, nodeFilteredInSaturation, nodeFilteredOutSaturation, nodeMaxRadius, nodeMinRadius, nodeOutline, nodeCountHint, edgeCountHint, width, height, cameraAdjustmentMode, autoBind, } = this; | ||
const { backgroundColor, cornerAxes, drawAxes, drawEdges, drawNodes, edgeAlpha, edgeAntialias, edgeConstantWidth, edgeDepthWrite, edgeFilteredInSaturation, edgeFilteredOutSaturation, edgeMaxWidth, edgeMinWidth, hideDeselected, hideEdgesOnMove, hideNodesOnMove, hoverHighlightColor, interpolationTime, is3D, nodeFilteredIds, nodeFilteredInSaturation, nodeFilteredOutSaturation, nodeMaxRadius, nodeMinRadius, nodeOutline, nodeCountHint, edgeCountHint, width, height, cameraAdjustmentMode, autoBind, dataBounds, } = this; | ||
return { | ||
@@ -368,2 +378,3 @@ backgroundColor, | ||
autoBind, | ||
dataBounds, | ||
}; | ||
@@ -370,0 +381,0 @@ } |
@@ -196,2 +196,6 @@ /*! | ||
autoBind: boolean; | ||
/** | ||
* The known bounds of the graph, setting this can speed up rendering | ||
*/ | ||
dataBounds: Maybe<Bounds>; | ||
} | ||
@@ -244,7 +248,2 @@ export interface NumberRange { | ||
* @internal | ||
* The current interpolation percentage for the camera transitioning from 3d to 2d | ||
*/ | ||
interpolation: number; | ||
/** | ||
* @internal | ||
* If true, deselected nodes should be hidden | ||
@@ -298,2 +297,6 @@ */ | ||
time: number; | ||
/** | ||
* If true, rendering should be forced | ||
*/ | ||
forceRender: boolean; | ||
} | ||
@@ -300,0 +303,0 @@ export interface ItemBasedRenderable { |
{ | ||
"name": "@graspologic/common", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A common set of types and utils used by graspologic", |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { ColorVector, CameraAdjustmentMode } from './types' | ||
import { ColorVector, CameraAdjustmentMode, Bounds3D } from './types' | ||
@@ -42,2 +42,3 @@ // Default color is transparent | ||
export const DEFAULT_HEIGHT = 500 | ||
export const DEFAULT_BOUNDS: Bounds3D | undefined = undefined | ||
export const DEFAULT_USE_DEVICE_PIXELS = true as boolean | number | ||
@@ -44,0 +45,0 @@ export const DEFAULT_SCALE_VIEW_ON_INIT = true |
@@ -36,2 +36,3 @@ /*! | ||
DEFAULT_AUTO_BIND, | ||
DEFAULT_BOUNDS, | ||
} from './defaults' | ||
@@ -43,2 +44,4 @@ import { | ||
RenderConfigurationOptions, | ||
Maybe, | ||
Bounds, | ||
} from './types' | ||
@@ -109,2 +112,3 @@ import { | ||
private _height = new PropertyContainer<number>(DEFAULT_HEIGHT) | ||
private _dataBounds = new PropertyContainer<Maybe<Bounds>>(DEFAULT_BOUNDS) | ||
@@ -250,2 +254,16 @@ // Axis Properties | ||
public get dataBounds(): Maybe<Bounds> { | ||
return this._dataBounds.value | ||
} | ||
public set dataBounds(value: Maybe<Bounds>) { | ||
this._dataBounds.value = value | ||
} | ||
public onDataBoundsChanged( | ||
handler: PropertyChangeHandler<Maybe<Bounds>>, | ||
): Disconnect { | ||
return this._dataBounds.on('change', handler) | ||
} | ||
public get edgeAntialias(): boolean { | ||
@@ -586,2 +604,3 @@ return this._edgeAntialias.value | ||
autoBind, | ||
dataBounds, | ||
} = this | ||
@@ -620,2 +639,3 @@ return { | ||
autoBind, | ||
dataBounds, | ||
} | ||
@@ -622,0 +642,0 @@ } |
@@ -250,2 +250,7 @@ /*! | ||
autoBind: boolean | ||
/** | ||
* The known bounds of the graph, setting this can speed up rendering | ||
*/ | ||
dataBounds: Maybe<Bounds> | ||
} | ||
@@ -307,8 +312,2 @@ | ||
* @internal | ||
* The current interpolation percentage for the camera transitioning from 3d to 2d | ||
*/ | ||
interpolation: number | ||
/** | ||
* @internal | ||
* If true, deselected nodes should be hidden | ||
@@ -371,2 +370,7 @@ */ | ||
time: number | ||
/** | ||
* If true, rendering should be forced | ||
*/ | ||
forceRender: boolean | ||
} | ||
@@ -373,0 +377,0 @@ |
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
334639
5940