Initializing
Liveweave
Web
expand_more
home
Home
data_object
CSS Explorer
arrow_outward
Palette
Color Explorer
arrow_outward
Polyline
Graphics Editor
arrow_outward
outbox_alt
Generative AI
arrow_outward
frame_source
Python Playground
New
arrow_outward
build
Tools
expand_more
restart_alt
Load "Hello Weaver!"
post_add
Generate Lorem ipsum...
code
Format HTML
code_blocks
Format CSS
data_object
Format JavaScript
library_add
Library
expand_more
A
Algolia JS
Animate CSS
Apex Charts JS
B
Bulma CSS
Bootstrap
C
Chart JS
Chartist
Create JS
D
D3
Dojo
F
Foundation
Fullpage JS
G
Granim JS
Google Charts
H
Halfmoon
J
jQuery
M
Materialize
Moment JS
Masonry JS
Milligram CSS
P
Pure CSS
Primer CSS
Popper JS
Pattern CSS
Picnic CSS
R
React JS
Raphael JS
Raisin CSS
S
Semantic UI
Skeleton CSS
Spectre CSS
Tachyons CSS
T
Tailwind
Three JS
U
UI Kit
Vis JS
W
Water CSS
download
Download
expand_more
developer_mode
Download as HTML
folder_zip
Download as .ZIP
cloud_upload
Save
account_circle
Login
settings
Settings
expand_more
14
px
Live mode
Night mode
Line number
Mini map
Word wrap
sync_alt
Reset Settings
smart_display
Run
<!DOCTYPE html> <head> <meta charset="UTF-8"> <title>Drawing Application</title> <link href="shape.css" rel="stylesheet"> <link href="css/ruler.css" rel="stylesheet"> <script src="shape.js"></script> <script type="text/javascript" src="src/rulers.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <link href="http://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css"> <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/kineticjs/5.2.0/kinetic.js"></script> <script type="text/javascript" src="js/canvas2image.js"></script> <script type="text/javascript" src="js/html2canvas.js"></script> <script type="text/javascript" src="js/base64.js"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <style> .ruler { position: absolute; top:142px; left:22px;; width: 93.9%; height: 25px; background: #eee; color: #000; font-family: arial; font-size: 12px; line-height: 14px; border-bottom: 1px solid; } .ruler > div { display: inline-block; background: #000; } .ruler .tickLabel { position:relative; top: -10px; margin-left: 4px; width: 1px; height: 100%; text-indent: 1px; line-height: 20px; } .ruler .tickLabel:first-of-type { margin-left: 0px; } .ruler .tickMajor { margin-top: 19px; margin-left: 4px; width: 1px; height: 6px; } .ruler .tickMinor { margin-left: 4px; width: 1px; height: 4px; } .top { z-index: 2; position: relative } .bottom { z-index: 1; position: relative } .col { float: left; padding: 5px 5px 5px 5px; margin: 5px 5px 5px 5px; } #col1 { width: 500px; height: 820px; border: 1px solid #CCC; float: left; } .drag { position: relative; background-size: contain !important; background-repeat: no-repeat; } table { } .switch { width: 214px; max-height: 100px; overflow-y: scroll; } .drag:hover { opacity: 0.6; filter: alpha(opacity=40); /* For IE8 and earlier */ } #droppable { width: 1280px; height: 490px; border: 1px solid #CCC; margin-top: 25px; } #droppable .drag { width: 200px; height: 220px; border: none; } #droppable .drag img { width: 100%; height: 100%; z-index: 0; } .drag2 { -moz-transform: scaleY(-1); -o-transform: scaleY(-1); -webkit-transform: scaleY(-1); transform: scaleY(-1); filter: FlipV; -ms-filter: "FlipV"; } .new-class { width: 200px; height: 220px; background-size: 200px; border: solid 4px #666; } .ui-resizable-handle { width: 10px; height: 10px; background-color: #ffffff; border: 1px solid #000000; } .ui-resizable-n { top: -10px; left: 50%; width: 6px; height: 6px; } .ui-resizable-e { right: -10px; top: 50%; width: 6px; height: 6px; } .ui-resizable-s { bottom: -10px; left: 50%; width: 6px; height: 6px; } .ui-resizable-w { left: -10px; top: 50%; width: 6px; height: 6px; } .ui-resizable-nw { left: -10px; top: -10px; width: 6px; height: 6px; } .ui-resizable-ne { top: -10px; right: -10px; width: 6px; height: 6px; } .ui-resizable-sw { bottom: -10px; left: -10px; width: 6px; height: 6px; } .ui-resizable-se { bottom: -10px; right: -10px; width: 6px; height: 6px; } .ui-resizable-helper { border: 1px dotted #CCC; } .toolsTop { background-color: #CCC; opacity: 0.6; filter: alpha(opacity=40); width: 70%; height: 50px; float: right; display: none; } #container { background: url(image/white.jpg) } </style> <script> </script> <script src="http://code.jquery.com/jquery-1.10.2.js"></script> <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script> <script type="text/javascript" src="http://www.google.com/jsapi"></script> </head> <script> $(document).ready(function () { var x = null; //Make element draggable $(".drag").draggable({ helper: 'clone', cursor: 'move', tolerance: 'fit', stack: '.drag', revert: "invalid" }); $("#droppable").droppable({ drop: function (e, ui) { if ($(ui.draggable)[0].id !== "") { x = ui.helper.clone(); ui.helper.remove(); x.draggable({ //helper: 'original', containment: '#droppable', tolerance: 'fit', stack: '.drag' }); x.resizable({ animate: true, //aspectRatio: 16 / 9, helper: "ui-resizable-helper", handles: "n, e, s, w, nw, ne, sw,se" }); x.appendTo('#droppable'); } } }); }); $(document).click(function (e) { // matches all children of droppable, change selector as needed if ($(e.target).closest(".drag").length > 0) { $(e.target).closest(".drag").find(".ui-resizable-handle").show(); $("#tools").show(); } else { $("#droppable").find(".ui-resizable-handle").hide(); $("#tools").hide(); } }); $(window).on('load resize', function() { $('.ruler').empty(); createRuler(); }); function createRuler() { var $ruler = $('.ruler'); for (var i = 0, step = 0; i < $ruler.innerWidth() / 5; i++, step++) { var $tick = $('<div>'); if (step == 0) { $tick.addClass('tickLabel').html(i * 5) ; } else if ([1, 3, 5, 7, 9].indexOf(step) > -1) { $tick.addClass('tickMinor'); if (step == 9) { step = -1; } } else { $tick.addClass('tickMajor'); } $ruler.append($tick); } } </script> <script language="javascript"> function btn() { //var testdiv = document.getElementById("droppable"); html2canvas($("#droppable"), { onrendered: function (canvas) { // canvas is the final rendered <canvas> element var myImage = canvas.toDataURL("image/png"); window.open(myImage); } }); } </script> <div id="menu" class="menu_hidden"> <span style="color:white; margin-bottom:-20px; z-index:3; font-family:Montserrat; font-size:11px; margin-top: 6px; position:absolute; margin-left:14px;">New</span> <div id="menu_button" class="btnSave" onClick="btn()" style="margin-left:5px; width:65%; height:8%; margin-top:20px; border-radius:7px;"> <img style="margin-left:12px; margin-top:9px;" src="image/documents29.png" title="New" width="55%"/> </div> </div> <div id="menu1"> <span style="color:white; margin-bottom:-20px; z-index:3; font-family:Montserrat; font-size:11px; margin-top: 5px; position:absolute; margin-left:14px;">Save</span> <div id="menu_button1" class="btnSave" onClick="btn()" style="margin-left:5px; width:65%; height:8%; margin-top:20px; border-radius:7px;"> <img style="margin-left:12px; margin-top:9px;" src="image/save.png" title="Save" width="55%"/> </div> </div> <div id="menu2"> <span style="color:white; margin-bottom:-20px; z-index:3; font-family:Montserrat; font-size:11px; margin-top: 5px; position:absolute; margin-left:5px;">Download</span> <div id="menu_button2" class="btnSave" onClick="btn()" style="margin-left:5px; width:65%; height:8%; margin-top:20px; border-radius:7px;"> <img style="margin-left:12px; margin-top:9px;" src="image/save-file.png" title="Save" width="55%"/> </div> </div> <div id="menu3"> <span style="color:white; margin-bottom:-20px; z-index:3; font-family:Montserrat; font-size:11px; margin-top: 5px; position:absolute; margin-left:17px;">Print</span> <div id="menu_button3" class="btnSave" onClick="btn()" style="margin-left:5px; width:65%; height:8%; margin-top:20px; border-radius:7px;"> <img style="margin-left:12px; margin-top:9px;" src="image/printer67.png" title="Save" width="55%"/> </div> </div> <div id="menu4"> <span style="color:white; margin-bottom:-20px; z-index:3; font-family:Montserrat; font-size:11px; margin-top: 5px; position:absolute; margin-left:17px;">Copy</span> <div id="menu_button4" class="btnSave" onClick="btn()" style="margin-left:5px; width:65%; height:8%; margin-top:20px; border-radius:7px;"> <img style="margin-left:12px; margin-top:9px;" src="image/copy1.png" title="Save" width="55%"/> </div> </div> <div id="func"> <span style="font-family:Montserrat; font-size:13px; margin-left:10px;">Switches</span> <span style="font-family:Montserrat; font-size:13px; margin-left:170px;">Telephony</span> </div> <table> <tr> <td> <div class="switch"> <table> <tr> <td> <div id="drag1" class="drag"> <img class="img" src="image/switches/1.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> <td> <div id="drag2" class="drag"> <img class="img" src="image/switches/2.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> <td width="20"> <div id="drag3" class="drag"> <img class="img" src="image/switches/3.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> <td> <div id="drag4" class="drag"> <img class="img" src="image/switches/4.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> </tr> <tr> <td> <div id="drag5" class="drag"> <img class="img" src="image/switches/5.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag6" class="drag"> <img class="img" src="image/switches/6.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag7" class="drag"> <img class="img" src="image/switches/7.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag8" class="drag"> <img class="img" src="image/switches/8.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> </tr> <tr> <td> <div id="drag9" class="drag"> <img class="img" src="image/switches/9.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag10" class="drag"> <img class="img" src="image/switches/10.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag11" class="drag"> <img class="img" src="image/switches/11.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag12" class="drag"> <img class="img" src="image/switches/12.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag25" class="drag"> <img class="img" src="image/switches/13.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> </tr> </table> </div> </td> <td> <span style="margin-left:10px;"> </span> </td> <td> <div class="switch"> <table> <tr> <td> <div id="drag13" class="drag"> <img class="img" src="image/telephony/1.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> <td> <div id="drag14" class="drag"> <img class="img" src="image/telephony/2.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> <td width="20"> <div id="drag15" class="drag"> <img class="img" src="image/telephony/3.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> <td> <div id="drag16" class="drag"> <img class="img" src="image/telephony/4.png" title="Line" width="45" height="32" style="cursor:pointer;"/> </div> </td> </tr> <tr> <td> <div id="drag17" class="drag"> <img class="img" src="image/telephony/4.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag18" class="drag"> <img class="img" src="image/telephony/1.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag19" class="drag"> <img class="img" src="image/telephony/2.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag20" class="drag"> <img class="img" src="image/telephony/3.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> </tr> <tr> <td> <div id="drag21" class="drag"> <img class="img" src="image/telephony/1.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag22" class="drag"> <img class="img" src="image/telephony/1.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag23" class="drag"> <img class="img" src="image/telephony/1.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> <td> <div id="drag24" class="drag"> <img class="img" src="image/telephony/1.png" title="Line" width="45" height="32" style=" cursor:pointer;"/> </div> </td> </tr> </table> </div> </td> </tr> </table> <div class="ruler"></div> <div class="col" id="droppable" style="background-color: white;"> </div> </body> <footer> </footer> </html>
.ruler { position: absolute; margin-top: -8px; margin-left: -8px; z-index: -1; border: white; background-image: url('image/drawBack.PNG'); background-repeat: repeat-x; } body { overflow: hidden; background-color: white; } #container { margin-top: 50px; margin-left: 50px; border: white; } #func ul li { display: inline; list-style-type: none; margin-right: 60px; margin-left:-45px; } #shape ul li { display: inline; list-style-type: none; margin-right: 100px; margin-left:-45px; } .btnSave { margin-top:-715px; padding: 3px; } .btnshape { margin-top:-715px; padding: 3px; } .btnSave:hover { } #menu { background: #B4BA22; border-radius: 1px; width: 6%; height:100%; position: absolute; z-index: 3; margin-left: 1290px; margin-top:-12px; border: white; } #menu2 { background: #B4BA22; border-radius: 1px; width: 6%; height:100%; position: absolute; z-index: 3; margin-left: 1290px; margin-top:154px; border: white; } #menu3 { background: #B4BA22; border-radius: 1px; width: 6%; height:100%; position: absolute; z-index: 3; margin-left: 1290px; margin-top:240px; border: white; } #menu4 { background: #B4BA22; border-radius: 1px; width: 6%; height:100%; position: absolute; z-index: 3; margin-left: 1290px; margin-top:325px; border: white; } #menu_button { background-color: whitesmoke; box-shadow: 0px 1px 3px 0px #000, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; } #menu_button:hover { background-color: white; cursor: pointer; } #menu_button1 { background-color: whitesmoke; box-shadow: 0px 1px 3px 0px #000, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; } #menu_button1:hover { background-color: white; cursor: pointer; } #menu_button2 { background-color: whitesmoke; box-shadow: 0px 1px 3px 0px #000, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; } #menu_button2:hover { background-color: white; cursor: pointer; } #menu_button3 { background-color: whitesmoke; box-shadow: 0px 1px 3px 0px #000, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; } #menu_button3:hover { background-color: white; cursor: pointer; } #menu_button4 { background-color: whitesmoke; box-shadow: 0px 1px 3px 0px #000, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; } #menu_button4:hover { background-color: white; cursor: pointer; } #menu_content { border: 1pt solid gray; border-radius: 6px; position: fixed; margin-top:0px; margin-left: -255px; width: 245px; box-shadow: 0px 1px 3px 0px gray, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; opacity: 1; height: 200px; overflow: hidden; background: white; transition: opacity .5s, width .5s; } /* This defines the menu state when it's hidden You could use the class to change the color, icon, etc. as well. */ #menu.menu_hidden #menu_content { width: 0; opacity: 0; } #menu1 { background: #B4BA22; border-radius: 1px; width: 6%; height:100%; position: absolute; z-index: 3; margin-left: 1290px; margin-top:70px; border: white; } .img1 { width:50px; } #menu_content1 { border: 1pt solid gray; position: fixed; border-radius: 6px; margin-top:10px; margin-left: -270px; width: 240px; box-shadow: 0px 1px 3px 0px gray, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; opacity: 1; height: 20%; overflow-y: scroll; background: white; /* Let's add some animated transitions */ transition: opacity .5s, width .5s; } /* This defines the menu state when it's hidden You could use the class to change the color, icon, etc. as well. */ #menu1.menu_hidden1 #menu_content1 { width: 0; opacity: 0; } #menu_content2 { border: 1pt solid gray; position: fixed; border-radius: 6px; margin-top:10px; margin-left: -270px; width: 240px; box-shadow: 0px 1px 3px 0px gray, 0px -2px 0px 0px rgba(0, 0, 0, 0.3) inset; opacity: 1; height: 20%; overflow-y: scroll; background: white; /* Let's add some animated transitions */ transition: opacity .5s, width .5s; } /* This defines the menu state when it's hidden You could use the class to change the color, icon, etc. as well. */ #menu2.menu_hidden2 #menu_content2 { width: 0; opacity: 0; } /* footer { width: 94%; overflow: hidden; height: 3%; background: whitesmoke; opacity:0; border-top-style: ridge; border-top-color: black; margin-top: 600px; margin-left:6px; z-index: 4; position: absolute; } footer:hover { opacity: 10; }*/