Adding SVG icons to svg-editor.html and related scripts, keeping old with -classic suffix
git-svn-id: http://svg-edit.googlecode.com/svn/branches/transformlist@916 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -11,16 +11,20 @@
|
||||
<link rel="stylesheet" href="spinbtn/JQuerySpinBtn.css" type="text/css"/>
|
||||
<!-- Development version of script tags: -->
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<!-- <script type="text/javascript" src="../../../svg-icon-loader/jquery.svgicons.js"></script> -->
|
||||
<script type="text/javascript" src="http://svg-icon-loader.googlecode.com/svn/trunk/jquery.svgicons.js"></script>
|
||||
<script>
|
||||
setIcons();
|
||||
</script>
|
||||
<script type="text/javascript" src="js-hotkeys/jquery.hotkeys.min.js"></script>
|
||||
<script type="text/javascript" src="jgraduate/jquery.jgraduate.js"></script>
|
||||
<script type="text/javascript" src="spinbtn/JQuerySpinBtn.js"></script>
|
||||
<script type="text/javascript" src="svgcanvas.js"></script>
|
||||
<script type="text/javascript" src="svg-editor.js"></script>
|
||||
<script type="text/javascript" src="locale/locale.js"></script>
|
||||
<!-- <script type="text/javascript" src="../../../svg-icon-loader/jquery.svgicons.js"></script> -->
|
||||
<script type="text/javascript" src="http://svg-icon-loader.googlecode.com/svn/trunk/jquery.svgicons.js"></script>
|
||||
|
||||
<style>
|
||||
/* This CSS replaces parts of/adds to svg-editor.css */
|
||||
#svg_editor .tool_button,
|
||||
#svg_editor #tools_rect .tool_flyout_button,
|
||||
#svg_editor #tools_ellipse .tool_flyout_button {
|
||||
@@ -141,7 +145,9 @@ TODO for SVG icons:
|
||||
- Make transparency icon clone to fill/stroke box when clicked
|
||||
|
||||
*/
|
||||
$(function() {
|
||||
|
||||
function setIcons() {
|
||||
|
||||
$.svgIcons('images/svg_edit_icons.svg', {
|
||||
w:24, h:24,
|
||||
id_match: false,
|
||||
@@ -248,7 +254,7 @@ $(function() {
|
||||
'#palette .palette_item:first':'no_color'
|
||||
},
|
||||
resize: {
|
||||
'#logo .svg_icon': 32,
|
||||
'#logo a .svg_icon': 32,
|
||||
'.flyout_arrow_horiz .svg_icon': 5,
|
||||
'.layer_button .svg_icon, #layerlist td.layervis .svg_icon': 14,
|
||||
'.dropdown button .svg_icon': 7,
|
||||
@@ -267,7 +273,10 @@ $(function() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
/* Unchanged, just here because they're private methods */
|
||||
var flyoutspeed = 1250;
|
||||
@@ -355,17 +364,17 @@ $(function() {
|
||||
|
||||
// Change icon size
|
||||
$('.tool_button, .push_button, .tool_button_current, .tool_button_disabled, .tool_flyout_button')
|
||||
.find('.svg_icon').each(function() {
|
||||
.find('svg').each(function() {
|
||||
this.setAttribute('width',size_num);
|
||||
this.setAttribute('height',size_num);
|
||||
});
|
||||
|
||||
$.resizeSvgIcons({
|
||||
'.flyout_arrow_horiz .svg_icon': size_num / 3,
|
||||
'#logo .svg_icon': size_num * 1.3
|
||||
'.flyout_arrow_horiz svg': size_num / 3,
|
||||
'#logo svg': size_num * 1.3
|
||||
});
|
||||
if(size != 's') {
|
||||
$.resizeSvgIcons({'#layerbuttons .svg_icon': size_num * .6});
|
||||
$.resizeSvgIcons({'#layerbuttons svg': size_num * .6});
|
||||
}
|
||||
|
||||
// Note that all rules will be prefixed with '#svg_editor' when parsed
|
||||
@@ -490,9 +499,9 @@ $(function() {
|
||||
});
|
||||
|
||||
// For quick testing
|
||||
window.setTimeout(function() {
|
||||
$('#iconsize').val('s').change();
|
||||
},1000);
|
||||
// window.setTimeout(function() {
|
||||
// $('#iconsize').val('s').change();
|
||||
// },1000);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -515,7 +524,7 @@ script type="text/javascript" src="locale/locale.min.js"></script-->
|
||||
<link rel="alternate" type="application/atom+xml" title="SVG-edit Updates (Issues/Fixes/Commits)" href="http://code.google.com/feeds/p/svg-edit/updates/basic" />
|
||||
|
||||
<!-- Add script with custom handlers here -->
|
||||
<title>SVG-edit demo (w/SVG icons)</title>
|
||||
<title>SVG-edit demo</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user