window.tableIndex = 0;
window.tablePositionList = [[], []];
// get a reference to the house icon in the toolbar
// hide the icon until its image has loaded
var $host = $("#host");
$host.hide();
var $hub = $("#hub");
$hub.hide();
var $vpcs = $("#vpcs");
$vpcs.hide();
var $roteador = $("#roteador");
$roteador.hide();
var $switche = $("#switche");
$switche.hide();
var $atm = $("#atm");
$atm.hide();
var $cloud = $("#cloud");
$cloud.hide();
var $frame_delay = $("#frame_delay");
$frame_delay.hide();
// get the offset position of the kinetic container
var $stageContainer = $("#container");
var stageOffset = $stageContainer.offset();
var offsetX = stageOffset.left;
var offsetY = stageOffset.top;
// create the Kinetic.Stage and layer
var stage = new Kinetic.Stage({
container: 'container',
width: 800,
height: 440
});
var layer = new Kinetic.Layer();
stage.add(layer);
// start loading the image used in the draggable toolbar element
// this image will be used in a new Kinetic.Image
var image1 = new Image();
image1.onload = function () {
$host.show();
};
var image2 = new Image();
image2.onload = function () {
$hub.show();
};
var image3 = new Image();
image3.onload = function () {
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.