Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { BlankLayer } from "./Blank";
import { GMapLayer } from "./GMap";
import { MapBoxLayer } from "./MapBox";
import { OpenStreetLayer } from "./OpenStreet";
import { ILayer, TileLayer } from "./TileLayer";
import "../../src/leaflet/Leaflet.css";
export class Leaflet extends HTMLWidget {
protected _leafletElement;
private _leafletMap: Map;
protected _iconBar = new IconBar()
.buttons([
new Button().faChar("fa-plus").tooltip("Zoom in")
.on("click", () => {
this.zoomPlus();
}),
new Button().faChar("fa-minus").tooltip("Zoom out")
.on("click", () => {
this.zoomMinus();
}),
new Spacer(),
new Button().faChar("fa-arrows-alt").tooltip("Zoom to fit")
.on("click", () => {
this.zoomToFit();
})
])
;
_blankLayer = new BlankLayer();
const samplePath = "https://raw.githack.com/hpcc-systems/Visualization/master/demos/gallery/";
export class SampleCarousel extends ChartPanel {
_samples = [];
_sampleWidgets = [];
_sampleCarousel = new Carousel();
_prevButton = new Button()
.faChar("fa-step-backward")
.on("click", () => {
this.decIdx();
this.renderSample();
});
_playPauseButton = new Button()
.faChar("fa-pause")
.on("click", () => {
this._playPauseButton.faChar(this.isPaused() ? "fa-pause" : "fa-play").lazyRender();
});
_nextButton = new Button()
.faChar("fa-step-forward")
.on("click", () => {
this.incIdx();
this.renderSample();
});
constructor() {
super();
this.visit(config.samples);
this.shuffle();
this._sampleWidgets = [];
if (this._contextMenu.open({
target: node,
currentTarget: node,
clientX: rect.left,
clientY: rect.bottom
})) {
}
});
private _removeButton = new Button().faChar("fa-minus").tooltip("Remove...")
.enabled(false)
.on("click", () => {
this.remove();
});
private _cloneButton = new Button().faChar("fa-clone").tooltip("Clone...")
.enabled(false)
.on("click", () => {
if (this._selectedDS2) {
if (this._selectedDS2 instanceof Databomb) {
this.add(new Databomb()
.format(this._selectedDS2.format())
.payload(this._selectedDS2.payload())
);
} else if (this._selectedDS2 instanceof Form) {
this.add(new Form()
.fromDDL(this._selectedDS2.toDDL())
);
} else if (this._selectedDS2 instanceof LogicalFile) {
this.add(new LogicalFile(this._ec)
.url(this._selectedDS2.url())
.logicalFile(this._selectedDS2.logicalFile())
import { Button, Spacer, ToggleButton, Widget } from "@hpcc-js/common";
import { ScopeGraph, Workunit } from "@hpcc-js/comms";
import { Table } from "@hpcc-js/dgrid";
import { Graph as GraphWidget, Subgraph, Vertex } from "@hpcc-js/graph";
import { Carousel, ChartPanel } from "@hpcc-js/layout";
import { hashSum } from "@hpcc-js/util";
import { WUGraphLegend } from "./WUGraphLegend";
import { WUScopeController } from "./WUScopeController";
import "../src/WUGraph.css";
export class WUGraph extends ChartPanel {
private _partialAll = new Button().faChar("fa-window-restore").tooltip("Partial All")
.on("click", () => {
this.stateClick(this._partialAll);
});
private _maxAll = new Button().faChar("fa-window-maximize").tooltip("Max All")
.on("click", () => {
this.stateClick(this._maxAll);
});
private _toggleGraph = new ToggleButton().faChar("fa-chain").tooltip("Graph")
.selected(true)
.on("click", () => {
this.viewClick(this._toggleGraph);
});
private _toggleActivities = new ToggleButton().faChar("fa-table").tooltip("Activitiies")