Commit 65f982b8 authored by Romain Courteaud's avatar Romain Courteaud

erp5_svg_editor: update gadget to match new version

parent aa40b51f
<!DOCTYPE html>
<html manifest="method-draw.appcache">
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<link rel="icon" type="image/png" href="images/logo.png"/>
<html>
<!--{if svg_edit_release}-->
<link rel="stylesheet" href="css/method-draw.compiled.css" type="text/css"/>
<link rel="stylesheet" href="css/fonts.css" type="text/css"/>
<!--{else}>
<link rel="stylesheet" href="lib/jgraduate/css/jPicker.css" type="text/css"/>
<link rel="stylesheet" href="lib/jgraduate/css/jgraduate.css" type="text/css"/>
<link rel="stylesheet" href="css/method-draw.css" type="text/css"/>
<link rel="stylesheet" href="css/fonts.css" type="text/css"/>
<!{endif}-->
<head>
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<link rel="icon" href="images/favicon.svg" sizes="any" type="image/svg+xml">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>Method Draw Vector Editor</title>
<meta charset="utf-8">
<meta name="description" content="Method Draw is an open source SVG editor for the web, you can use it online without signing up.">
<script type="text/javascript" src="lib/jquery.js"></script>
<!--{if svg_edit_release}-->
<script type="text/javascript" src="method-draw.compiled.js"></script>
<!--{else}>
<script type="text/javascript" src="lib/pathseg.js"></script>
<script type="text/javascript" src="lib/touch.js"></script>
<script type="text/javascript" src="lib/js-hotkeys/jquery.hotkeys.min.js"></script>
<script type="text/javascript" src="icons/jquery.svgicons.js"></script>
<script type="text/javascript" src="lib/jgraduate/jquery.jgraduate.js"></script>
<script type="text/javascript" src="lib/contextmenu/jquery.contextMenu.js"></script>
<script type="text/javascript" src="lib/jquery-ui/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="src/browser.js"></script>
<script type="text/javascript" src="src/svgtransformlist.js"></script>
<script type="text/javascript" src="src/math.js"></script>
<script type="text/javascript" src="src/units.js"></script>
<script type="text/javascript" src="src/svgutils.js"></script>
<script type="text/javascript" src="src/sanitize.js"></script>
<script type="text/javascript" src="src/history.js"></script>
<script type="text/javascript" src="src/select.js"></script>
<script type="text/javascript" src="src/draw.js"></script>
<script type="text/javascript" src="src/path.js"></script>
<script type="text/javascript" src="src/dialog.js"></script>
<script type="text/javascript" src="src/svgcanvas.js"></script>
<script type="text/javascript" src="src/method-draw.js"></script>
<script type="text/javascript" src="lib/jquery-draginput.js"></script>
<script type="text/javascript" src="lib/contextmenu.js"></script>
<script type="text/javascript" src="lib/jgraduate/jpicker.min.js"></script>
<script type="text/javascript" src="lib/mousewheel.js"></script>
<script type="text/javascript" src="extensions/ext-eyedropper.js"></script>
<script type="text/javascript" src="extensions/ext-shapes.js"></script>
<script type="text/javascript" src="extensions/ext-grid.js"></script>
<script type="text/javascript" src="lib/requestanimationframe.js"></script>
<script type="text/javascript" src="lib/taphold.js"></script>
<script type="text/javascript" src="lib/filesaver.js"></script>
<!{endif}-->
<!-- renderjs -->
<script src="../rsvp.js"></script>
<script src="../renderjs.js"></script>
<!-- custom script -->
<script src="method-draw.gadget.js"></script>
<title>Method Draw</title>
<!-- build:css all.css -->
<link rel="stylesheet" href="css/base.css" type="text/css"/>
<link rel="stylesheet" href="css/method-draw.css" type="text/css"/>
<link rel="stylesheet" href="css/jpicker.css" type="text/css"/>
<link rel="stylesheet" href="css/jgraduate.css" type="text/css"/>
<link rel="stylesheet" href="css/fonts.css" type="text/css"/>
<link rel="stylesheet" href="css/dropdown.css" type="text/css"/>
<link rel="stylesheet" href="css/draginput.css" type="text/css"/>
<link rel="stylesheet" href="css/menu.css" type="text/css"/>
<link rel="stylesheet" href="css/rulers.css" type="text/css"/>
<link rel="stylesheet" href="css/palette.css" type="text/css"/>
<link rel="stylesheet" href="css/color-tool.css" type="text/css"/>
<link rel="stylesheet" href="css/context-menu.css" type="text/css"/>
<link rel="stylesheet" href="css/shapelib.css" type="text/css"/>
<link rel="stylesheet" href="css/modal.css" type="text/css"/>
<link rel="stylesheet" href="css/source.css" type="text/css"/>
<link rel="stylesheet" href="css/keyboard.css" type="text/css"/>
<link rel="stylesheet" href="css/dialog.css" type="text/css"/>
<link rel="stylesheet" href="css/app.css" type="text/css"/>
<link rel="stylesheet" href="css/tools.css" type="text/css"/>
<link rel="stylesheet" href="css/button.css" type="text/css"/>
<link rel="stylesheet" href="css/select.css" type="text/css"/>
<link rel="stylesheet" href="css/panel.css" type="text/css"/>
<link rel="stylesheet" href="css/align_buttons.css" type="text/css"/>
<link rel="stylesheet" href="css/text.css" type="text/css"/>
<link rel="stylesheet" href="css/sponsors.css" type="text/css"/>
<link rel="stylesheet" href="css/zoom-dropdown.css" type="text/css"/>
<link rel="stylesheet" href="css/loading.css" type="text/css"/>
<!-- endbuild -->
<!-- build:js loading.js -->
<!--script type="text/javascript" src="js/loading.js"></script-->
<!-- endbuild -->
<script src="../rsvp.js"></script>
<script src="../renderjs.js"></script>
<!-- custom script -->
<script src="method-draw.gadget.js"></script>
</head>
<body>
<div id="svg_editor">
<body class="loading">
<div id="method-draw" class="app">
<div id="rulers">
<div id="ruler_corner"></div>
<div id="ruler_x">
<div id="ruler_x_cursor"></div>
<div>
<canvas height="15"></canvas>
</div>
</div>
<div id="ruler_y">
<div id="ruler_y_cursor"></div>
<div>
<canvas width="15"></canvas>
</div>
</div>
<div id="ruler_x"></div>
<div id="ruler_y"></div>
</div>
<div id="workarea">
<div id="svgcanvas" style="position:relative">
<div id="svgcanvas">
</div>
</div>
<div id="menu_bar">
<a class="menu">
<div class="menu_title" id="logo"></div>
<div class="menu_list">
<div id="tool_about" class="menu_item">About this Editor...</div>
<div class="menu_title" id="logo">
<svg viewBox="0 0 16 16" width="16" height="16" xmlns="http://www.w3.org/2000/svg">
<path d="M-.1 16.1L16 .04V16.1H-.1z"></path>
<path d="M0 16.1V.1l16 16H0z" fill="var(--z7)"></path>
</svg>
</div>
<div class="menu_list inverted-undo">
<div id="modal_about" class="menu_item" data-action="about">About this app...</div>
<div class="separator"></div>
<div id="tool_about" class="menu_item">Keyboard Shortcuts...</div>
<div id="modal_preferences" class="menu_item" data-action="configure">Configure...</div>
<div id="modal_shortcuts" class="menu_item" data-action="shortcuts">Keyboard Shortcuts...</div>
<div id="modal_donate" class="menu_item" data-action="donate">Donate or sponsor...</div>
</div>
</a>
<div class="menu">
<div class="menu_title">File</div>
<div class="menu_list" id="file_menu">
<div id="tool_clear" class="menu_item">New Document</div>
<div id="tool_open" class="menu_item" style="display: none;"><div id="fileinputs"></div>Open SVG...</div>
<div id="tool_import" class="menu_item" style="display: none;"><div id="fileinputs_import"></div>Import Image...</div>
<div id="tool_save" class="menu_item">Save Image... <span class="shortcut">⌘S</span></div>
<div id="tool_export" class="menu_item">Export as PNG</div>
<div class="menu_list inverted-undo" id="file_menu">
<div data-action="clear" id="tool_clear" class="menu_item">New Document</div>
<div id="tool_open" class="menu_item">
<input type="file" accept="image/svg+xml" id="tool_open_input" />
Open SVG... <span class="shortcut" style="display: none;">⌘O</span>
</div>
<div id="tool_import" class="menu_item">
<input type="file" accept="image/*" id="tool_import_input" />
Place Image... <span class="shortcut" style="display: none;">⌘K</span>
</div>
<div data-action="save" id="tool_save" class="menu_item">Save Image... <span class="shortcut">⌘S</span></div>
<div data-action="export" id="tool_export" class="menu_item">Export as PNG</div>
</div>
</div>
<div class="menu">
<div class="menu_title">Edit</div>
<div class="menu_list" id="edit_menu">
<div class="menu_item" id="tool_undo">Undo <span class="shortcut">⌘Z</span></div>
<div class="menu_item" id="tool_redo">Redo <span class="shortcut">⌘Y</span></div>
<div class="menu_list inverted-undo" id="edit_menu">
<div data-action="undo" class="menu_item" id="tool_undo">Undo <span class="shortcut">⌘Z</span></div>
<div data-action="redo" class="menu_item" id="tool_redo">Redo <span class="shortcut">⌘Y</span></div>
<div class="separator"></div>
<div class="menu_item action_selected disabled" id="tool_cut">Cut <span class="shortcut">⌘X</span></div>
<div class="menu_item action_selected disabled" id="tool_copy">Copy <span class="shortcut">⌘C</span></div>
<div class="menu_item action_selected disabled" id="tool_paste">Paste <span class="shortcut">⌘V</span></div>
<div class="menu_item action_selected disabled" id="tool_clone">Duplicate <span class="shortcut">⌘D</span></div>
<div class="menu_item action_selected disabled" id="tool_delete">Delete <span></span></div>
<div data-action="cutSelected" class="menu_item action_selected disabled" id="tool_cut">Cut <span class="shortcut">⌘X</span></div>
<div data-action="copySelected" class="menu_item action_selected disabled" id="tool_copy">Copy <span class="shortcut">⌘C</span></div>
<div data-action="pasteSelected" class="menu_item action_selected disabled" id="tool_paste">Paste <span class="shortcut">⌘V</span></div>
<div data-action="duplicateSelected" class="menu_item action_selected disabled" id="tool_clone">Duplicate <span class="shortcut">⌘D</span></div>
<div data-action="deleteSelected" class="menu_item action_selected disabled" id="tool_delete">Delete <span></span></div>
</div>
</div>
<div class="menu">
<div class="menu_title">Object</div>
<div class="menu_list" id="object_menu">
<div class="menu_list inverted-undo" id="object_menu">
<div class="menu_item action_selected disabled" id="tool_move_top">Bring to Front <span class="shortcut">⌘⇧↑</span></div>
<div class="menu_item action_selected disabled" id="tool_move_up">Bring Forward <span class="shortcut">⌘↑</span></div>
<div class="menu_item action_selected disabled" id="tool_move_down">Send Backward <span class="shortcut">⌘↓</span></div>
......@@ -142,317 +131,420 @@
<div class="menu">
<div class="menu_title">View</div>
<div class="menu_list" id="view_menu">
<div class="menu_item push_button_pressed" id="tool_rulers">View Rulers</div>
<div class="menu_list inverted-undo" id="view_menu">
<div class="menu_item push_button_pressed" id="tool_rulers">View Rulers <span class="shortcut">⇧R</span></div>
<div class="menu_item" id="tool_wireframe">View Wireframe</div>
<div class="menu_item" id="tool_snap">Snap to Grid</div>
<div class="separator"></div>
<div class="menu_item" id="tool_source">Source... <span class="shortcut">⌘U</span></div>
<div class="menu_item" id="tool_source" data-action="source">Source... <span class="shortcut">⌘U</span></div>
</div>
</div>
<div class="sponsors" id="sponsors">
<div class="sponsor">
<a href="https://deta.space/discovery/method-draw?ref=method.ac" class="deta">
<span></span><span></span><span></span><span></span>
Install
</a>
<div class="sponsor-description inverted-undo">
<strong>Install Method Draw on Deta Space</strong>
<span>With Method Draw on Deta Space, you can securely save, open, and share your designs in the cloud.</span>
<p>These designs are available to you across your devices, over the internet, for free.</p><p> Click the button to try Method Draw on Deta Space!</p>
<svg class="sponsor-logo" width="100%" height="100%" fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 225" preserveAspectRatio="xMidYMid meet"><g clip-path="url(#deta_new_svg__clip0)"><path d="M111.14 0c61.38 0 111.139 49.705 111.139 111.02S172.52 222.04 111.14 222.04C49.759 222.04 0 172.335 0 111.02S49.759 0 111.14 0z" fill="#EF39A8"></path><path d="M111.404 21.676c49.689 0 89.97 40.237 89.97 89.873s-40.281 89.873-89.97 89.873-89.97-40.237-89.97-89.873 40.281-89.873 89.97-89.873z" fill="#BD399C"></path><path d="M111.404 45.465c36.536 0 66.154 29.586 66.154 66.084 0 36.497-29.618 66.083-66.154 66.083S45.25 148.046 45.25 111.549c0-36.498 29.618-66.084 66.154-66.084z" fill="#93388E"></path><path d="M110.874 65.555c24.844 0 44.985 20.119 44.985 44.937 0 24.817-20.141 44.936-44.985 44.936s-44.985-20.119-44.985-44.936c0-24.818 20.141-44.937 44.985-44.937z" fill="#6030A2"></path><path d="M339 170.836h49.915c23.004 0 40.365-5.842 51.867-17.745 11.719-11.902 17.579-25.752 17.579-41.983 0-16.23-5.86-30.296-17.579-42.199-11.502-11.902-28.863-17.745-51.867-17.745H339v119.672zm96.574-59.728c0 11.686-3.907 21.641-11.719 29.864-7.596 8.007-19.315 12.119-34.94 12.119h-27.779V68.909h27.779c15.625 0 27.344 4.112 34.94 12.119 7.812 8.223 11.719 18.178 11.719 30.08zm40.582 10.388c0 30.08 19.098 51.504 52.302 51.504 22.136 0 39.931-10.604 47.744-30.513h-24.523c-5.426 8.44-13.022 12.768-23.221 12.768-16.928 0-27.778-10.82-29.732-27.7h79.212v-6.059c0-29.648-19.966-51.505-50.782-51.505-31.034 0-51 21.208-51 51.505zm78.995-8.224h-56.208c2.388-14.932 11.936-25.535 28.213-25.535 15.843 0 25.608 10.387 27.995 25.535zm73.353 20.992V88.386h24.957v-16.23h-24.957V49h-21.702v23.155h-16.06v16.23h16.06v45.879c0 14.499 3.038 24.237 9.332 29.431 6.293 5.193 15.191 7.79 26.693 7.79 3.69 0 6.944-.216 9.766-.865l4.123-.866v-17.096l-4.123.433c-2.822.433-6.076.649-9.766.649-11.719 0-14.323-6.059-14.323-19.476zm93.101-63.624c-14.54 0-25.825 3.03-33.638 9.306-8.029 6.276-11.936 13.85-11.936 22.723h22.136c0-10.388 11.719-14.283 23.438-14.283 14.757 0 23.872 5.193 23.872 18.827v6.059h-26.693c-26.259 0-46.659 6.709-46.659 28.782 0 20.342 15.625 30.946 38.847 30.946 14.973 0 25.607-3.679 31.901-11.037l3.039-3.678c0 4.111 1.735 10.387 2.386 12.551H770v-1.731l-1.519-4.761c-.868-3.246-1.302-8.223-1.302-15.148v-38.088c0-28.998-16.493-40.468-45.574-40.468zm23.872 57.131c0 19.693-9.982 29.864-28.863 29.864-12.37 0-22.354-4.111-22.354-14.499 0-11.902 10.852-15.365 24.524-15.581l26.693.216z" fill="#000"></path></g><defs><clipPath id="deta_new_svg__clip0"><path fill="#fff" d="M0 0h770v222.04H0z"></path></clipPath></defs></svg>
<div class="sponsor-disclaimer">Deta is a sponsor of Method Draw</div>
</div>
</div>
</div>
<div class="menu-right">
<button class="menu-icon" id="darkmode-button">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"></path></svg>
</button>
</div>
</div>
<div id="tools_top" class="tools_panel">
<div id="panels" class="tools_panel">
<div id="canvas_panel" class="context_panel">
<h4 class="clearfix">Canvas</h4>
<label data-title="Change canvas width">
<input size="3" id="canvas_width" type="text" pattern="[0-9]*" />
<span class="icon_label">Width</span>
</label>
<label data-title="Change canvas height">
<input id="canvas_height" size="3" type="text" pattern="[0-9]*" />
<span class="icon_label">Height</span>
</label>
<label data-title="Change canvas color" class="draginput">
<span>Color</span>
<div id="color_canvas_tools">
<div class="color_tool active" id="tool_canvas">
<div class="color_block">
<div id="canvas_bg"></div>
<div id="canvas_color"></div>
<h4>Canvas</h4>
<div class="draginputs">
<label class="draginput twocol textcontent" data-title="Change Content">
<input id="canvas_title" type="text" />
<span>Title</span>
</label>
<label data-title="Change canvas width" class="draginput">
<input id="canvas_width" type="text" pattern="[0-9]*" value="800" />
<span class="icon_label">Width</span>
</label>
<label data-title="Change canvas height" class="draginput">
<input id="canvas_height" type="text" pattern="[0-9]*" value="600" />
<span class="icon_label">Height</span>
</label>
<label data-title="Change canvas color" class="draginput">
<span>Color</span>
<div id="color_canvas_tools">
<div class="color_tool active" id="tool_canvas">
<div class="color_block">
<div id="canvas_bg"></div>
<div id="canvas_color"></div>
</div>
</div>
</div>
</label>
<div class="draginput">
<span>Sizes</span>
<select id="resolution">
<option id="selectedPredefined" selected="selected">Custom</option>
<option id="fitToContent" value="content">Fit to Content</option>
<optgroup label="Social Media">
<option value="1012x506">Twitter Post (1012 × 506)</option>
<option value="1500x500">Twitter Header (1500 × 500)</option>
<option value="1200x630">Facebook Post (1200 × 630)</option>
<option value="820x312">Facebook Cover (820 × 312)</option>
<option value="1080x1080">Instagram Post (1080 × 1080)</option>
<option value="1080x1920">Instagram Story (1080 × 1920)</option>
<option value="300">Dribble Shot (400 × 300)</option>
<option value="800x600">Dribble Shot HD (800 × 600)</option>
<option value="1584x396">LinkedIn Cover (1584 × 396)</option>
</optgroup>
<optgroup label="Presentation">
<option value="1920x1080">16:9 (1920 × 1080)</option>
<option value="1024x768">4:3 (1024 × 768)</option>
</optgroup>
<optgroup label="Desktop">
<option value="1140x1024">Desktop (1140 × 1024)</option>
<option value="375x700">MacBook (834 × 1194)</option>
<option value="1440x900">MacBook Pro (1024 × 1366)</option>
<option value="1500x1000">Surface Book (1440 × 990)</option>
<option value="1280x720">iMac (1368 × 912)</option>
</optgroup>
<optgroup label="Tablet">
<option value="414x896">iPad Mini (768 × 1024)</option>
<option value="375x812">iPad Pro 11" (834 × 1194)</option>
<option value="375x812">iPad Pro 12.9" (1024 × 1366)</option>
<option value="414x736">Surface Pro 3 (1440 × 990)</option>
<option value="414x736">Surface Pro 4 (1368 × 912)</option>
</optgroup>
<optgroup label="Phone">
<option value="414x896">iPhone 11 ProMax (414 × 896)</option>
<option value="375x812">iPhone 11 Pro / X (375 × 812)</option>
<option value="414x736">iPhone 8 Plus (414 × 736)</option>
<option value="375x667">iPhone 8 (375 × 667)</option>
<option value="411x731">Google Pixel 2 (411 × 731)</option>
<option value="411x823">Google Pixel XL (411 × 823)</option>
<option value="360x640">Android (360 × 640)</option>
</optgroup>
<optgroup label="Paper">
<option value="595x842">A4 (595 × 842)</option>
<option value="420x595">A5 (420 × 595)</option>
<option value="297x420">A6 (297 × 420)</option>
<option value="612x792">Letter (612 × 792) </option>
<option value="792x1224">Tabloid (792 × 1224)</option>
</optgroup>
</select>
<div class="caret"></div>
<label id="resolution_label">Custom</label>
</div>
</label>
<div class="draginput">
<span>Sizes</span>
<select id="resolution">
<option id="selectedPredefined" selected="selected">Custom</option>
<option>640x480</option>
<option>800x600</option>
<option>1024x768</option>
<option>1280x960</option>
<option>1600x1200</option>
<option id="fitToContent" value="content">Fit to Content</option>
</select>
<div class="caret"></div>
<label id="resolution_label">Custom</label>
</div>
</div>
</div>
<div id="rect_panel" class="context_panel">
<h4 class="clearfix">Rectangle</h4>
<label>
<input id="rect_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label>
<input id="rect_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
<label id="rect_width_tool attr_changer" data-title="Change rectangle width">
<input id="rect_width" class="attr_changer" size="3" data-attr="width" type="text" pattern="[0-9]*" />
<span class="icon_label">Width</span>
</label>
<label id="rect_height_tool" data-title="Change rectangle height">
<input id="rect_height" class="attr_changer" size="3" data-attr="height" type="text" pattern="[0-9]*" />
<span class="icon_label">Height</span>
</label>
<h4>Rectangle</h4>
<div class="draginputs">
<label class="draginput">
<input id="rect_x" class="attr_changer" data-title="Change X coordinate" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label class="draginput">
<input id="rect_y" class="attr_changer" data-title="Change Y coordinate" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
<label class="draginput" id="rect_width_tool attr_changer" data-title="Change rectangle width">
<input id="rect_width" class="attr_changer" data-attr="width" type="text" pattern="[0-9]*" />
<span class="icon_label">Width</span>
</label>
<label class="draginput" id="rect_height_tool" data-title="Change rectangle height">
<input id="rect_height" class="attr_changer" data-attr="height" type="text" pattern="[0-9]*" />
<span class="icon_label">Height</span>
</label>
</div>
</div>
<div id="path_panel" class="context_panel clearfix">
<h4 class="clearfix">Path</h4>
<label>
<input id="path_x" class="attr_changer" data-title="Change ellipse's cx coordinate" size="3" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label>
<input id="path_y" class="attr_changer" data-title="Change ellipse's cy coordinate" size="3" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
<h4>Path</h4>
<div class="draginputs">
<label>
<input id="path_x" class="attr_changer" data-title="Change ellipse's cx coordinate" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label>
<input id="path_y" class="attr_changer" data-title="Change ellipse's cy coordinate" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
</div>
</div>
<div id="image_panel" class="context_panel clearfix">
<h4>Image</h4>
<label>
<input id="image_x" class="attr_changer" data-title="Change X coordinate" size="3" data-attr="x" pattern="[0-9]*"/>
<span>X</span>
</label>
<label>
<input id="image_y" class="attr_changer" data-title="Change Y coordinate" size="3" data-attr="y" pattern="[0-9]*"/>
<span>Y</span>
</label>
<label>
<input id="image_width" class="attr_changer" data-title="Change image width" size="3" data-attr="width" pattern="[0-9]*" />
<span class="icon_label">Width</span>
</label>
<label>
<input id="image_height" class="attr_changer" data-title="Change image height" size="3" data-attr="height" pattern="[0-9]*" />
<span class="icon_label">Height</span>
</label>
<div class="draginputs">
<label class="draginput">
<input id="image_x" class="attr_changer" data-title="Change X coordinate" data-attr="x" pattern="[0-9]*"/>
<span>X</span>
</label>
<label class="draginput">
<input id="image_y" class="attr_changer" data-title="Change Y coordinate" data-attr="y" pattern="[0-9]*"/>
<span>Y</span>
</label>
<label class="draginput">
<input id="image_width" class="attr_changer" data-title="Change image width" data-attr="width" pattern="[0-9]*" />
<span class="icon_label">Width</span>
</label>
<label class="draginput">
<input id="image_height" class="attr_changer" data-title="Change image height" data-attr="height" pattern="[0-9]*" />
<span class="icon_label">Height</span>
</label>
</div>
</div>
<div id="circle_panel" class="context_panel">
<h4>Circle</h4>
<label id="tool_circle_cx">
<span>Center X</span>
<input id="circle_cx" class="attr_changer" title="Change circle's cx coordinate" size="3" data-attr="cx"/>
</label>
<label id="tool_circle_cy">
<span>Center Y</span>
<input id="circle_cy" class="attr_changer" title="Change circle's cy coordinate" size="3" data-attr="cy"/>
</label>
<label id="tool_circle_r">
<span>Radius</span>
<input id="circle_r" class="attr_changer" title="Change circle's radius" size="3" data-attr="r"/>
</label>
</div>
<div id="ellipse_panel" class="context_panel clearfix">
<h4>Ellipse</h4>
<label id="tool_ellipse_cx">
<input id="ellipse_cx" class="attr_changer" data-title="Change ellipse's cx coordinate" size="3" data-attr="cx" pattern="[0-9]*" />
<span>X</span>
</label>
<label id="tool_ellipse_cy">
<input id="ellipse_cy" class="attr_changer" data-title="Change ellipse's cy coordinate" size="3" data-attr="cy" pattern="[0-9]*" />
<span>Y</span>
</label>
<label id="tool_ellipse_rx">
<input id="ellipse_rx" class="attr_changer" data-title="Change ellipse's x radius" size="3" data-attr="rx" pattern="[0-9]*" />
<span>Radius X</span>
</label>
<label id="tool_ellipse_ry">
<input id="ellipse_ry" class="attr_changer" data-title="Change ellipse's y radius" size="3" data-attr="ry" pattern="[0-9]*" />
<span>Radius Y</span>
</label>
<div class="draginputs">
<label id="tool_circle_cx" class="draginput">
<span>Center X</span>
<input id="circle_cx" class="attr_changer" title="Change circle's cx coordinate" data-attr="cx"/>
</label>
<label id="tool_circle_cy" class="draginput">
<span>Center Y</span>
<input id="circle_cy" class="attr_changer" title="Change circle's cy coordinate" data-attr="cy"/>
</label>
<label id="tool_circle_r" class="draginput">
<span>Radius</span>
<input id="circle_r" class="attr_changer" title="Change circle's radius" data-attr="r"/>
</label>
</div>
</div>
<div id="ellipse_panel" class="context_panel">
<h4>Ellipse</h4>
<div class="draginputs">
<label id="tool_ellipse_cx">
<input id="ellipse_cx" class="attr_changer" data-title="Change ellipse's cx coordinate" data-attr="cx" pattern="[0-9]*" />
<span>X</span>
</label>
<label id="tool_ellipse_cy">
<input id="ellipse_cy" class="attr_changer" data-title="Change ellipse's cy coordinate" data-attr="cy" pattern="[0-9]*" />
<span>Y</span>
</label>
<label id="tool_ellipse_rx">
<input id="ellipse_rx" class="attr_changer" data-title="Change ellipse's x radius" data-attr="rx" pattern="[0-9]*" />
<span>Radius X</span>
</label>
<label id="tool_ellipse_ry">
<input id="ellipse_ry" class="attr_changer" data-title="Change ellipse's y radius" data-attr="ry" pattern="[0-9]*" />
<span>Radius Y</span>
</label>
</div>
</div>
<div id="line_panel" class="context_panel clearfix">
<h4>Line</h4>
<label id="tool_line_x1">
<input id="line_x1" class="attr_changer" data-title="Change line's starting x coordinate" size="3" data-attr="x1" pattern="[0-9]*" />
<span>Start X</span>
</label>
<label id="tool_line_y1">
<input id="line_y1" class="attr_changer" data-title="Change line's starting y coordinate" size="3" data-attr="y1" pattern="[0-9]*" />
<span>Start Y</span>
</label>
<label id="tool_line_x2">
<input id="line_x2" class="attr_changer" data-title="Change line's ending x coordinate" size="3" data-attr="x2" pattern="[0-9]*" />
<span>End X</span>
</label>
<label id="tool_line_y2">
<input id="line_y2" class="attr_changer" data-title="Change line's ending y coordinate" size="3" data-attr="y2" pattern="[0-9]*" />
<span>End Y</span>
</label>
<div class="draginputs">
<label id="tool_line_x1">
<input id="line_x1" class="attr_changer" data-title="Change line's starting x coordinate" data-attr="x1" pattern="[0-9]*" />
<span>Start X</span>
</label>
<label id="tool_line_y1">
<input id="line_y1" class="attr_changer" data-title="Change line's starting y coordinate" data-attr="y1" pattern="[0-9]*" />
<span>Start Y</span>
</label>
<label id="tool_line_x2">
<input id="line_x2" class="attr_changer" data-title="Change line's ending x coordinate" data-attr="x2" pattern="[0-9]*" />
<span>End X</span>
</label>
<label id="tool_line_y2">
<input id="line_y2" class="attr_changer" data-title="Change line's ending y coordinate" data-attr="y2" pattern="[0-9]*" />
<span>End Y</span>
</label>
</div>
</div>
<div id="text_panel" class="context_panel">
<h4>Text</h4>
<label>
<input id="text_x" class="attr_changer" data-title="Change text x coordinate" size="3" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label>
<input id="text_y" class="attr_changer" data-title="Change text y coordinate" size="3" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
<div class="toolset draginput select twocol" id="tool_font_family">
<!-- Font family -->
<span>Font</span>
<div id="preview_font" style="font-family: Helvetica, Arial, sans-serif;">Helvetica</div>
<div class="caret"></div>
<input id="font_family" data-title="Change Font Family" size="12" type="hidden" />
<select id="font_family_dropdown">
<option value="monospace">Monospace</option>
<option value="serif">Serif</option>
<option value="sans-serif">Sans Serif</option>
<option value="Arvo, sans-serif">Arvo</option>
<option value="'Courier New', Courier, monospace">Courier</option>
<option value="Euphoria, sans-serif">Euphoria</option>
<option value="Georgia, Times, 'Times New Roman', serif">Georgia</option>
<option value="Helvetica, Arial, sans-serif" selected="selected">Helvetica</option>
<option value="Junction, sans-serif">Junction</option>
<option value="'League Gothic', sans-serif">League Gothic</option>
<option value="'Open Sans', sans-serif">Open Sans</option>
<option value="Oswald, sans-serif">Oswald</option>
<option value="'Palatino Linotype', 'Book Antiqua', Palatino, serif">Palatino</option>
<option value="'Trebuchet MS', Gadget, sans-serif">Trebuchet</option>
<option value="'Shadows Into Light', serif">Shadows Into Light</option>
<option value="'Simonetta', serif">Simonetta</option>
<option value="'Times New Roman', Times, serif">Times</option>
</select>
<div class="tool_button" id="tool_bold" data-title="Bold Text [B]">B</div>
<div class="tool_button" id="tool_italic" data-title="Italic Text [I]">i</div>
<div class="draginputs">
<label class="draginput twocol textcontent hidden" data-title="Change Content">
<input id="text" type="text" autocomplete="off"/>
<span>Content</span>
</label>
<label>
<input id="text_x" class="attr_changer" data-title="Change text x coordinate" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label>
<input id="text_y" class="attr_changer" data-title="Change text y coordinate" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
<div class="toolset draginput twocol" id="tool_font_family">
<!-- Font family -->
<span>Font</span>
<div id="preview_font" style="font-family: sans-serif">sans-serif</div>
<div class="caret"></div>
<input id="font_family" data-title="Change Font Family" size="12" type="hidden" />
<select id="font_family_dropdown">
</select>
</div>
<div class="draginput font_style">
<span>Font Style</span>
<div id="tool_bold" data-title="Bold Text [B]">B</div>
<div id="tool_italic" data-title="Italic Text [I]">i</div>
</div>
<label id="tool_font_size" data-title="Change Font Size">
<input id="font_size" value="0" />
<span id="font_sizeLabel" class="icon_label">Font Size</span>
</label>
</div>
<label id="tool_font_size" data-title="Change Font Size">
<input id="font_size" size="3" value="0" />
<span id="font_sizeLabel" class="icon_label">Font Size</span>
</label>
<!-- Not visible, but still used -->
<input id="text" type="text" size="35"/>
</div>
<!-- formerly gsvg_panel -->
<div id="container_panel" class="context_panel clearfix">
<div id="svg_panel" class="context_panel clearfix">
<h4>SVG</h4>
</div>
<div id="use_panel" class="context_panel clearfix">
<div class="tool_button clearfix" id="tool_unlink_use" data-title="Break link to reference element (make unique)">Break link reference</div>
<h4>Use</h4>
<div class="button full" id="tool_unlink_use" data-title="Break link">Break use ref</div>
</div>
<div id="g_panel" class="context_panel clearfix">
<h4>Group</h4>
<label>
<input id="g_x" class="attr_changer" data-title="Change groups's x coordinate" size="3" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label>
<input id="g_y" class="attr_changer" data-title="Change groups's y coordinate" size="3" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
<div class="draginputs">
<label>
<input id="g_x" class="attr_changer" data-title="Change groups's x coordinate" data-attr="x" pattern="[0-9]*" />
<span>X</span>
</label>
<label>
<input id="g_y" class="attr_changer" data-title="Change groups's y coordinate" data-attr="y" pattern="[0-9]*" />
<span>Y</span>
</label>
</div>
<div class="button full" title="Ungroup Elements" id="button_ungroup">Ungroup</div>
</div>
<div id="path_node_panel" class="context_panel clearfix">
<h4>Edit Path</h4>
<label id="tool_node_x">
<input id="path_node_x" class="attr_changer" data-title="Change node's x coordinate" size="3" data-attr="x" />
<span>X</span>
</label>
<label id="tool_node_y">
<input id="path_node_y" class="attr_changer" data-title="Change node's y coordinate" size="3" data-attr="y" />
<span>Y</span>
</label>
<div id="segment_type" class="draginput label">
<span>Segment Type</span>
<select id="seg_type" data-title="Change Segment type">
<option id="straight_segments" selected="selected" value="4">Straight</option>
<option id="curve_segments" value="6">Curve</option>
</select>
<div class="caret"></div>
<label id="seg_type_label">Straight</label>
<div class="draginputs">
<label id="tool_node_x">
<input id="path_node_x" class="attr_changer" data-title="Change node's x coordinate" data-attr="x" />
<span>X</span>
</label>
<label id="tool_node_y">
<input id="path_node_y" class="attr_changer" data-title="Change node's y coordinate" data-attr="y" />
<span>Y</span>
</label>
<div id="segment_type" class="draginput label">
<span>Seg Type</span>
<select id="seg_type" data-title="Change Segment type">
<option id="straight_segments" selected="selected" value="4">Straight</option>
<option id="curve_segments" value="6">Curve</option>
</select>
<div class="caret"></div>
<label id="seg_type_label">Straight</label>
</div>
</div>
<!--
<label class="draginput checkbox" data-title="Link Control Points">
<span>Linked Control Points</span>
<div class="push_bottom"><input type="checkbox" id="tool_node_link" checked="checked" /></div>
</label>
-->
<div class="clearfix"></div>
<div class="tool_button" id="tool_node_clone" title="Adds a node">Add Node</div>
<div class="tool_button" id="tool_node_delete" title="Delete Node">Delete Node</div>
<div class="tool_button" id="tool_openclose_path" title="Open/close sub-path">Open Path</div>
<!--<div class="tool_button" id="tool_add_subpath" title="Add sub-path"></div>-->
<div class="button-container clearfix">
<div class="button full" id="tool_node_clone" title="Adds a node">Add Node</div>
<div class="button full" id="tool_node_delete" title="Delete Node">Delete Node</div>
<div class="button full" id="tool_openclose_path" title="Open/close sub-path">Open/close Path</div>
</div>
</div>
<!-- Buttons when a single element is selected -->
<div id="selected_panel" class="context_panel">
<label id="tool_angle" data-title="Change rotation angle" class="draginput">
<input id="angle" class="attr_changer" size="2" value="0" data-attr="transform" data-min="-180" data-max="180" type="text"/>
<span class="icon_label">Rotation</span>
<div id="tool_angle_indicator">
<div id="tool_angle_indicator_cursor"></div>
</div>
</label>
<label class="toolset" id="tool_opacity" data-title="Change selected item opacity">
<input id="group_opacity" class="attr_changer" data-attr="opacity" data-multiplier="0.01" size="3" value="100" step="5" min="0" max="100" />
<div class="draginputs">
<label id="tool_angle" data-title="Change rotation angle" class="draginput">
<input id="angle" class="attr_changer" size="2" value="0" data-attr="transform" data-min="-180" data-max="180" type="text"/>
<span class="icon_label">Rotation</span>
<div id="tool_angle_indicator" class="angle">
<div id="tool_angle_indicator_cursor" class="angle-cursor"></div>
</div>
</label>
<label id="tool_opacity" data-title="Change selected item opacity">
<input id="group_opacity" class="attr_changer" data-attr="opacity" value="100" step="5" min="0" max="100" />
<span id="group_opacityLabel" class="icon_label">Opacity</span>
</label>
<div class="toolset" id="tool_blur" data-title="Change gaussian blur value">
<label>
<input id="blur" size="2" value="0" step=".1" min="0" max="10" />
<span class="icon_label">Blur</span>
<label id="tool_blur" data-title="Change gaussian blur value">
<input id="blur" size="2" value="0" step=".1" min="0" max="10" />
<span class="icon_label">Blur</span>
</label>
<label id="cornerRadiusLabel" data-title="Change Rectangle Corner Radius">
<input id="rect_rx" value="0" data-attr="rx" class="attr_changer" type="text" pattern="[0-9]*" />
<span class="icon_label">Roundness</span>
</label>
</div>
<label id="cornerRadiusLabel" data-title="Change Rectangle Corner Radius">
<input id="rect_rx" size="3" value="0" data-attr="rx" class="attr_changer" type="text" pattern="[0-9]*" />
<span class="icon_label">Roundness</span>
</label>
<div class="clearfix"></div>
<div id="align_tools">
<h4>Align</h4>
<h4>Align to canvas</h4>
<div class="toolset align_buttons" id="tool_position">
<label>
<div class="col last clear" id="position_opts">
<div class="draginput_cell" id="tool_posleft" title="Align Left"></div>
<div class="draginput_cell" id="tool_poscenter" title="Align Center"></div>
<div class="draginput_cell" id="tool_posright" title="Align Right"></div>
<div class="draginput_cell" id="tool_postop" title="Align Top"></div>
<div class="draginput_cell" id="tool_posmiddle" title="Align Middle"></div>
<div class="draginput_cell" id="tool_posbottom" title="Align Bottom"></div>
<div class="align_button" id="tool_posleft" title="Align Left" data-align="left">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 Z" />
</svg>
</div>
<div class="align_button" id="tool_poscenter" title="Align Center" data-align="center">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 Z" />
</svg>
</div>
<div class="align_button" id="tool_posright" title="Align Right" data-align="right">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 Z"/>
</svg>
</div>
<div class="align_button" id="tool_postop" title="Align Top" data-align="top">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 Z"/>
</svg>
</div>
<div class="align_button" id="tool_posmiddle" title="Align Middle" data-align="middle">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 Z"/>
</svg>
</div>
<div class="align_button" id="tool_posbottom" title="Align Bottom" data-align="bottom">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25"/>
</svg>
</div>
</div>
<div class="clearfix"></div>
</label>
</div>
</div>
......@@ -462,56 +554,83 @@
<div id="multiselected_panel" class="context_panel clearfix">
<h4 class="hidable">Multiple Elements</h4>
<div class="toolset align_buttons" style="position: relative">
<label id="tool_align_relative" style="margin-top: 10px;">
<select id="align_relative_to" title="Align relative to ...">
<option id="selected_objects" value="selected">Align to objects</option>
<option id="page" value="page">Align to page</option>
</select>
<div class="toolset align_buttons">
<label id="tool_align_relative">
<div class="select-input">
<select id="align_relative_to" title="Align relative to ..." class="select_tool">
<option id="selected_objects" value="selected">Align to objects</option>
<option id="page" value="page">Align to page</option>
</select>
</div>
</label>
<h4>.</h4>
<div class="col last clear">
<div class="draginput_cell" id="tool_alignleft" title="Align Left"></div>
<div class="draginput_cell" id="tool_aligncenter" title="Align Center"></div>
<div class="draginput_cell" id="tool_alignright" title="Align Right"></div>
<div class="draginput_cell" id="tool_aligntop" title="Align Top"></div>
<div class="draginput_cell" id="tool_alignmiddle" title="Align Middle"></div>
<div class="draginput_cell" id="tool_alignbottom" title="Align Bottom"></div>
<div class="col last clear">
<div class="align_button" id="tool_alignleft" title="Align Left" data-align="left">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 2 1 L 2 5 L 14 5 L 14 11 L 2 11 L 2 16 L 20 16 L 20 22 L 2 22 L 2 26 L 1 26 L 1 1 L 2 1 Z" />
</svg>
</div>
<div class="align_button" id="tool_aligncenter" title="Align Center" data-align="center">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 13 1 L 14 1 L 14 6 L 22 6 L 22 12 L 14 12 L 14 15 L 19 15 L 19 21 L 14 21 L 14 26 L 13 26 L 13 21 L 8 21 L 8 15 L 13 15 L 13 12 L 5 12 L 5 6 L 13 6 L 13 1 Z" />
</svg>
</div>
<div class="align_button" id="tool_alignright" title="Align Right" data-align="right">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 25 1 L 25 5 L 13 5 L 13 11 L 25 11 L 25 16 L 7 16 L 7 22 L 25 22 L 25 26 L 26 26 L 26 1 L 25 1 Z"/>
</svg>
</div>
<div class="align_button" id="tool_aligntop" title="Align Top" data-align="top">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 1 2 L 5 2 L 5 14 L 11 14 L 11 2 L 16 2 L 16 20 L 22 20 L 22 2 L 26 2 L 26 1 L 1 1 L 1 2 Z"/>
</svg>
</div>
<div class="align_button" id="tool_alignmiddle" title="Align Middle" data-align="middle">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 26 13 L 26 14 L 21 14 L 21 22 L 15 22 L 15 14 L 12 14 L 12 19 L 6 19 L 6 14 L 1 14 L 1 13 L 6 13 L 6 8 L 12 8 L 12 13 L 15 13 L 15 5 L 21 5 L 21 13 L 26 13 Z"/>
</svg>
</div>
<div class="align_button" id="tool_alignbottom" title="Align Bottom" data-align="bottom">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="27" height="27">
<path d="M 1 25 L 5 25 L 5 13 L 11 13 L 11 25 L 16 25 L 16 7 L 22 7 L 22 25 L 26 25 L 26 26 L 1 26 L 1 25"/>
</svg>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="button full" id="button_group">Group Elements</div>
<div class="button full" id="tool_text_on_path" title="Place text on path">Place text on path</div>
</div>
<div id="stroke_panel" class="context_panel clearfix">
<div class="clearfix"></div>
<div id="stroke_panel" class="context_panel">
<h4>Stroke</h4>
<div class="toolset" data-title="Change stroke">
<label>
<input id="stroke_width" size="2" value="5" data-attr="stroke-width" min="0" max="99" step="1" />
<span class="icon_label">Stroke Width</span>
<div class="draginputs">
<label class="draginput" data-title="Change stroke">
<input id="stroke_width" size="2" value="1" data-attr="stroke-width" min="0" max="99" step="1" />
<span class="icon_label">Width</span>
</label>
<div class="stroke_tool draginput">
<span>Dash</span>
<select id="stroke_style" data-title="Change stroke dash style">
<option selected="selected" value="none"></option>
<option value="2,2">···</option>
<option value="5,5">- -</option>
<option value="5,2,2,2">-·-</option>
<option value="5,2,2,2,2,2">-··-</option>
</select>
<div class="caret"></div>
<label id="stroke_style_label"></label>
</div>
<label style="display: none;">
<span class="icon_label">Stroke Join</span>
</label>
<label style="display: none;">
<span class="icon_label">Stroke Cap</span>
</label>
</div>
<div class="stroke_tool draginput">
<span>Stroke Dash</span>
<select id="stroke_style" data-title="Change stroke dash style">
<option selected="selected" value="none"></option>
<option value="2,2">···</option>
<option value="5,5">- -</option>
<option value="5,2,2,2">-·-</option>
<option value="5,2,2,2,2,2">-··-</option>
</select>
<div class="caret"></div>
<label id="stroke_style_label"></label>
</div>
<label style="display: none;">
<span class="icon_label">Stroke Join</span>
</label>
<label style="display: none;">
<span class="icon_label">Stroke Cap</span>
</label>
</div>
</div> <!-- tools_top -->
......@@ -519,19 +638,61 @@
</div>
<div id="tools_left" class="tools_panel">
<div class="tool_button" id="tool_select" title="Select Tool [V]"></div>
<div class="tool_button" id="tool_fhpath" title="Pencil Tool [P]"></div>
<div class="tool_button" id="tool_line" title="Line Tool [L]"></div>
<div class="tool_button" id="tool_rect" title="Square/Rect Tool [R]"></div>
<div class="tool_button" id="tool_ellipse" title="Ellipse/Circle Tool [C]"></div>
<div class="tool_button" id="tool_path" title="Path Tool [P]"></div>
<div class="tool_button" id="tool_text" title="Text Tool [T]"></div>
<div class="tool_button" id="tool_zoom" title="Zoom Tool [Z]"></div>
<div class="tool_button" id="tool_select" data-mode="select" title="Select Tool [V]">
<svg viewBox="0 0 24 24" width="24" height="24">
<path d="M17.15 20.76l-2.94 1.5-3.68-6-4.41 3V1.24l12.5 12.01-4.41 1.5 2.94 6z"/>
</svg>
</div>
<div class="tool_button" id="tool_fhpath" data-mode="fhpath" title="Pencil Tool [P]">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" style="transform: scale(-1,1)"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" /></svg>
</div>
<div class="tool_button" id="tool_line" data-mode="line" title="Line Tool [L]">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="24" height="24" >
<path d="M 3 1 L 26 24 L 24 26 L 1 3 L 3 1 Z"></path>
</svg>
</div>
<div class="tool_button" id="tool_rect" data-mode="rect" title="Square/Rect Tool [R]">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<path d="M 0 8 L 0 24 L 24 24 L 25 8 L 0 8 Z"/>
</svg>
</div>
<div class="tool_button" id="tool_ellipse" data-mode="ellipse" title="Ellipse/Circle Tool [C]">
<svg viewBox="0 0 27 27" xmlns="http://www.w3.org/2000/svg" width="24" height="24">
<ellipse cx="13" cy="13" rx="13" ry="9"></ellipse>
</svg>
</div>
<div class="tool_button" id="tool_shapelib" data-mode="shapelib" title="Shape Tool [s]" >
<svg xmlns="http://www.w3.org/2000/svg" height="27" width="27" viewBox="0 0 24 24" >
<polygon points="14.43,10 12,2 9.57,10 2,10 8.18,14.41 5.83,22 12,17.31 18.18,22 15.83,14.41 22,10"/>
</svg>
<div class="tool_menu">
</div>
</div>
<div class="tool_button" id="tool_path" data-mode="path" title="Path Tool [P]">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27" width="27" height="27">
<path d="M12.2 1.9c0-.36.86 0 .86 0V14a1.3 1.3 0 10.88 0V1.9s.87-.36.87 0c0 6.81 5.22 11.68 5.22 11.68l-3.25 8.2h-6.55l-3.26-8.2s5.22-4.87 5.22-11.68zM7.83 25.26v-2.61h11.32v2.6H7.84z"/>
</svg>
</div>
<div class="tool_button" id="tool_text" data-mode="text" title="Text Tool [T]">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27" height="27"><path d="M5 4v3h5.5v12h3V7H19V4z"/></svg>
</div>
<div class="tool_button" id="tool_zoom" data-mode="zoom" title="Zoom Tool [Z]">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
</div>
<div class="tool_button" id="tool_eyedropper" data-mode="eyedropper" title="Eyedropper Tool [E]">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27" style="transform: scale(-1, 1)"><path d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"/></svg>
</div>
<div id="color_tools">
<div id="tool_switch" title="Switch stroke and fill colors [X]"></div>
<div id="tool_switch" title="Switch stroke and fill colors [X]">
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'><path d='M3.01 2A6 6 0 019 8h1.83l-2.91 2.91L5 8h2a4 4 0 00-3.99-4v1.93L.1 3.02 3.01.1V2z' /></svg>
</div>
<div class="color_tool active" id="tool_fill">
<label class="icon_label" title="Change fill color"></label>
<div class="color_block">
......@@ -553,69 +714,38 @@
<div id="tools_bottom" class="tools_panel">
<!-- Zoom buttons -->
<select id="zoom_select">
<option value="6">6%</option>
<option value="12">12%</option>
<option value="16">16%</option>
<option value="25">25%</option>
<option value="50">50%</option>
<option value="75">75%</option>
<option value="100" selected="selected">100%</option>
<option value="150">150%</option>
<option value="200">200%</option>
<option value="300">300%</option>
<option value="400">400%</option>
<option value="600">600%</option>
<option value="800">800%</option>
<option value="1600">1600%</option>
</select>
<div id="zoom_panel" class="toolset" title="Change zoom level">
<div class="draginput select" id="zoom_label">
<span id="zoomLabel" class="zoom_tool icon_label"></span>
<select id="zoom_select">
<option value="6">6%</option>
<option value="12">12%</option>
<option value="16">16%</option>
<option value="25">25%</option>
<option value="50">50%</option>
<option value="75">75%</option>
<option value="100" selected="selected">100%</option>
<option value="150">150%</option>
<option value="200">200%</option>
<option value="300">300%</option>
<option value="400">400%</option>
<option value="600">600%</option>
<option value="800">800%</option>
<option value="1600">1600%</option>
</select>
<div class="caret"></div>
<input id="zoom" size="3" value="100%" type="text" readonly="readonly" />
<div class="select-input" id="zoom_label">
<span id="zoomLabel" class="zoom_tool icon_label">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="2 2 20 20" width="27"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>
</span>
<input id="zoom" value="100%" type="text" readonly="readonly" />
</div>
</div>
<div id="tools_bottom_3">
<div id="palette" title="Click to change fill color, shift-click to change stroke color"></div>
</div>
<div id="palette" title="Click to change fill color, shift-click to change stroke color"></div>
</div>
<!-- hidden divs -->
<div id="color_picker"></div>
</div> <!-- svg_editor -->
<div id="svg_source_editor">
<div id="svg_source_overlay"></div>
<div id="svg_source_container">
<div id="save_output_btns">
<p id="copy_save_note">Copy the contents of this box into a text editor, then save the file with a .svg extension.</p>
<button id="copy_save_done">Done</button>
</div>
<form>
<textarea id="svg_source_textarea" spellcheck="false"></textarea>
</form>
<div id="tool_source_back" class="toolbar_button">
<button id="tool_source_cancel" class="cancel">Cancel</button>
<button id="tool_source_save" class="ok">Apply Changes</button>
</div>
</div>
</div>
<div id="base_unit_container">
<select id="base_unit">
<option value="px">Pixels</option>
<option value="cm">Centimeters</option>
<option value="mm">Millimeters</option>
<option value="in">Inches</option>
<option value="pt">Points</option>
<option value="pc">Picas</option>
<option value="em">Ems</option>
<option value="ex">Exs</option>
</select>
</div>
</div> <!-- /app -->
<div id="dialog_box">
<div id="dialog_box_overlay"></div>
......@@ -638,5 +768,66 @@
<li><a href="#move_back">Send to Back<span class="shortcut">⌘⇧↓</span></a></li>
</ul>
<div class="tools_flyout inverted-undo" id="tools_shapelib">
<div id="shape_buttons"></div>
</div>
<!-- build:js all.js -->
<script type="text/javascript" src="js/lib/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="js/lib/pathseg.js"></script>
<script type="text/javascript" src="js/lib/jquery.hotkeys.min.js"></script>
<script type="text/javascript" src="js/lib/jquery.jgraduate.js"></script>
<script type="text/javascript" src="js/lib/jquery.contextMenu.js"></script>
<script type="text/javascript" src="js/lib/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.attr.js"></script>
<script type="text/javascript" src="js/lib/jquery-draginput.js"></script>
<script type="text/javascript" src="js/lib/css.min.js"></script>
<script type="text/javascript" src="js/utils.js"></script>
<script type="text/javascript" src="js/dao.js"></script>
<script type="text/javascript" src="js/state.js"></script>
<script type="text/javascript" src="js/sanitize.js"></script>
<script type="text/javascript" src="js/browser.js"></script>
<script type="text/javascript" src="js/svgutils.js"></script>
<script type="text/javascript" src="js/history.js"></script>
<script type="text/javascript" src="js/select.js"></script>
<script type="text/javascript" src="js/path.js"></script>
<script type="text/javascript" src="js/sanitize.js"></script>
<script type="text/javascript" src="js/units.js"></script>
<script type="text/javascript" src="js/math.js"></script>
<script type="text/javascript" src="js/translate.js"></script>
<script type="text/javascript" src="js/svgtransformlist.js"></script>
<script type="text/javascript" src="js/draw.js"></script>
<script type="text/javascript" src="js/svgcanvas.js"></script>
<script type="text/javascript" src="js/editor.js"></script>
<script type="text/javascript" src="js/Canvas.js"></script>
<script type="text/javascript" src="js/Text.js"></script>
<script type="text/javascript" src="js/Pan.js"></script>
<script type="text/javascript" src="js/Panel.js"></script>
<script type="text/javascript" src="js/Rulers.js"></script>
<script type="text/javascript" src="js/Toolbar.js"></script>
<script type="text/javascript" src="js/Menu.js"></script>
<script type="text/javascript" src="js/Keyboard.js"></script>
<script type="text/javascript" src="js/Import.js"></script>
<script type="text/javascript" src="js/PaintBox.js"></script>
<script type="text/javascript" src="js/Palette.js"></script>
<script type="text/javascript" src="js/Zoom.js"></script>
<script type="text/javascript" src="js/Modal.js"></script>
<script type="text/javascript" src="js/Title.js"></script>
<script type="text/javascript" src="js/darkmode.js"></script>
<script type="text/javascript" src="js/ContextMenu.js"></script>
<script type="text/javascript" src="js/Shapelib.js"></script>
<script type="text/javascript" src="js/fonts.js"></script>
<script type="text/javascript" src="js/dialog.js"></script>
<script type="text/javascript" src="js/lib/contextmenu.js"></script>
<script type="text/javascript" src="js/lib/jpicker.min.js"></script>
<script type="text/javascript" src="js/lib/mousewheel.js"></script>
<script type="text/javascript" src="js/eyedropper.js"></script>
<script type="text/javascript" src="js/lib/requestanimationframe.js"></script>
<script type="text/javascript" src="js/lib/taphold.js"></script>
<script type="text/javascript" src="js/lib/filesaver.js"></script>
<script type="text/javascript" src="js/paste.js"></script>
<script type="text/javascript" src="js/modals.js"></script>
<script type="text/javascript" src="js/start.js"></script>
<!-- endbuild -->
</body>
</html>
\ No newline at end of file
/*jslint indent: 2 */
/*global window, rJS, RSVP, curConfig, svgCanvas */
/*global window, rJS, RSVP, svgCanvas */
(function (window, rJS, RSVP) {
"use strict";
curConfig.jGraduatePath = "lib/jgraduate/images/"; // XXX images are not loaded at the good place
rJS(window)
.ready(function (g) {
g.props = {};
var deferred = RSVP.defer();
svgCanvas.ready(function () {
deferred.resolve();
});
return deferred.promise;
})
.declareMethod('render', function (options) {
[].forEach.call(window.document.head.querySelectorAll("base"), function (el) {
// XXX GadgetField adds <base> tag to fit to the parent page location, it's BAD to remove them.
// In the case of method-draw, all component are loaded dynamicaly through ajax requests in
// method-draw "folder". By setting a <base> tag, we change the url resolution behavior, and
// we break all dynamic links. So, deleting <base> is required.
window.document.head.removeChild(el);
return this.changeState({
key: options.key,
value: options.value
});
this.props.key = options.key;
svgCanvas.setSvgString(options.value);
})
.onStateChange(function () {
svgCanvas.setSvgString(this.state.value);
})
.declareService(function () {
if (/(?:^\?|&)auto_focus=(true|1)(?:&|$)/.test(window.location.search)) {
......@@ -32,8 +20,9 @@
})
.declareMethod('getContent', function () {
var form_data = {};
form_data[this.props.key] = svgCanvas.getSvgString();
form_data[this.state.key] = svgCanvas.getSvgString();
this.state.value = form_data[this.state.key]
return form_data;
});
}, {mutex: 'statechange'});
}(window, rJS, RSVP));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment