Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
f7b117456d
5 changed files with 115 additions and 85 deletions
|
@ -318,6 +318,8 @@
|
||||||
<path d="M209.1,157.9c-0.8,0.7-1.7,1.5-2.7,2.6v17.4c0,4,0.4,5.3,2.7,5.9"/>
|
<path d="M209.1,157.9c-0.8,0.7-1.7,1.5-2.7,2.6v17.4c0,4,0.4,5.3,2.7,5.9"/>
|
||||||
</g>
|
</g>
|
||||||
<g>
|
<g>
|
||||||
|
<polyline opacity="0.2" fill="#231F20" points="209.1,76.4 118.7,186.5 139.1,186.4 209.1,121 209.1,76.4 "/>
|
||||||
|
<polyline opacity="0.4" fill="#231F20" points="209.1,76.2 118.5,186.5 129.7,186.4 200.2,120.3 209.1,100.8 209.1,76.4 "/>
|
||||||
<path fill="#FFD761" d="M121.6,88.7l0.8,87.5l62.3-56.7c0,0-15.3-25.8-24.8-30C151.1,85.6,121.6,88.7,121.6,88.7z"/>
|
<path fill="#FFD761" d="M121.6,88.7l0.8,87.5l62.3-56.7c0,0-15.3-25.8-24.8-30C151.1,85.6,121.6,88.7,121.6,88.7z"/>
|
||||||
<path fill="#FEA01E" d="M209.1,19.5h-54l-33.5,69.2c0,0,29.7-3.4,38.3,0.8c8.9,4.4,25,30.8,25,30.8l24.2-50V19.5z"/>
|
<path fill="#FEA01E" d="M209.1,19.5h-54l-33.5,69.2c0,0,29.7-3.4,38.3,0.8c8.9,4.4,25,30.8,25,30.8l24.2-50V19.5z"/>
|
||||||
<path d="M120.4,153.7l-0.6,25l23.8-16.9c0,0-8-7-11.2-8.1C129.4,152.8,120.4,153.7,120.4,153.7z"/>
|
<path d="M120.4,153.7l-0.6,25l23.8-16.9c0,0-8-7-11.2-8.1C129.4,152.8,120.4,153.7,120.4,153.7z"/>
|
||||||
|
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
@ -1,5 +1,5 @@
|
||||||
body {
|
body {
|
||||||
background: #E8E8E8;
|
background: #D8D8D8;
|
||||||
}
|
}
|
||||||
|
|
||||||
#svg_editor {
|
#svg_editor {
|
||||||
|
@ -106,7 +106,6 @@ body {
|
||||||
|
|
||||||
#svg_editor #layerpanel {
|
#svg_editor #layerpanel {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #E8E8E8;
|
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
|
@ -124,7 +123,8 @@ body {
|
||||||
#svg_editor #sidepanel_handle {
|
#svg_editor #sidepanel_handle {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #E8E8E8;
|
background-color: #D8D8D8;
|
||||||
|
font-weight: bold;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
top: 40%;
|
top: 40%;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
|
@ -247,17 +247,19 @@ body {
|
||||||
left: 4px;
|
left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#svg_editor #main_icon {
|
#svg_editor #main_icon {
|
||||||
|
background: #E8E8E8;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -2px;
|
top: -2px;
|
||||||
left: -2px;
|
left: -2px;
|
||||||
padding: 1px 0 2px 1px;
|
padding: 1px 0 2px 1px;
|
||||||
width: 44px;
|
width: 44px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
border-left: 1px solid #EEE;
|
border-left: 1px solid #FFF;
|
||||||
border-top: 1px solid #EEE;
|
border-top: 1px solid #FFF;
|
||||||
border-right: 1px solid #CCC;
|
border-right: 1px solid #808080;
|
||||||
border-bottom: 1px solid #CCC;
|
border-bottom: 1px solid #808080;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
-moz-border-radius: 8px;
|
-moz-border-radius: 8px;
|
||||||
-webkit-border-radius: 8px;
|
-webkit-border-radius: 8px;
|
||||||
|
@ -376,7 +378,6 @@ body {
|
||||||
top: 75px;
|
top: 75px;
|
||||||
left: 0;
|
left: 0;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
background: #E8E8E8;
|
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -556,8 +557,8 @@ span.zoom_tool {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
border-left: 1px solid #FFFFFF;
|
border-left: 1px solid #FFF;
|
||||||
border-top: 1px solid #FFFFFF;
|
border-top: 1px solid #FFF;
|
||||||
border-right: 1px solid #808080;
|
border-right: 1px solid #808080;
|
||||||
border-bottom: 1px solid #808080;
|
border-bottom: 1px solid #808080;
|
||||||
background-color: #E8E8E8;
|
background-color: #E8E8E8;
|
||||||
|
|
|
@ -171,12 +171,39 @@ function svg_edit_setup() {
|
||||||
var fillPaint = new $.jGraduate.Paint({solidColor: "FF0000"}); // solid red
|
var fillPaint = new $.jGraduate.Paint({solidColor: "FF0000"}); // solid red
|
||||||
var strokePaint = new $.jGraduate.Paint({solidColor: "000000"}); // solid black
|
var strokePaint = new $.jGraduate.Paint({solidColor: "000000"}); // solid black
|
||||||
|
|
||||||
// TODO: Unfortunately Mozilla does not handle internal references to gradients
|
|
||||||
// inside a data: URL document. This means that any elements filled/stroked
|
|
||||||
// with a gradient will appear black in Firefox, etc. See bug 308590
|
|
||||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=308590
|
|
||||||
var saveHandler = function(window,svg) {
|
var saveHandler = function(window,svg) {
|
||||||
|
|
||||||
window.opener.postMessage(svg, window.location.protocol + '//' + window.location.host);
|
window.opener.postMessage(svg, window.location.protocol + '//' + window.location.host);
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Creates and opens an HTML page that provides a link to the SVG, a preview, and the markup.
|
||||||
|
// Also includes warning about Mozilla bug #308590 when applicable
|
||||||
|
|
||||||
|
var win = window.open("data:image/svg+xml;base64," + Utils.encode64(svg));
|
||||||
|
|
||||||
|
// Alert will only appear the first time saved OR the first time the bug is encountered
|
||||||
|
var done = $.pref('save_notice_done') + ""; // TODO: Find out why this returns an object in FF when online
|
||||||
|
if(done !== "all") {
|
||||||
|
|
||||||
|
var note = 'Select "Save As..." in your browser to save this image as an SVG file.';
|
||||||
|
|
||||||
|
// Check if FF and has <defs/>
|
||||||
|
if(navigator.userAgent.indexOf('Gecko/') !== -1) {
|
||||||
|
if(svg.indexOf('<defs') !== -1) {
|
||||||
|
note += "\n\nNOTE: Due to a bug in your browser, this image may appear wrong (missing gradients or elements). It will however appear correct once actually saved.";
|
||||||
|
$.pref('save_notice_done', 'all');
|
||||||
|
done = "all";
|
||||||
|
} else {
|
||||||
|
$.pref('save_notice_done', 'part');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$.pref('save_notice_done', 'all');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(done !== 'part') {
|
||||||
|
win.alert(note);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// called when we've selected a different element
|
// called when we've selected a different element
|
||||||
|
@ -2785,7 +2812,7 @@ function svg_edit_setup() {
|
||||||
updateCanvas(true);
|
updateCanvas(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
// var revnums = "svg-editor.js ($Rev: 1377 $) ";
|
// var revnums = "svg-editor.js ($Rev: 1386 $) ";
|
||||||
// revnums += svgCanvas.getVersion();
|
// revnums += svgCanvas.getVersion();
|
||||||
// $('#copyright')[0].setAttribute("title", revnums);
|
// $('#copyright')[0].setAttribute("title", revnums);
|
||||||
return svgCanvas;
|
return svgCanvas;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*
|
/*
|
||||||
* svgcanvas.js
|
* svgcanvas.js
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2
|
* Licensed under the Apache License, Version 2
|
||||||
|
|
Loading…
Add table
Reference in a new issue