Very minor: indent/clean-up

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2700 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Brett Zamir 2014-02-17 00:46:57 +00:00
parent 6fe03a595f
commit ce0e07b278
1 changed files with 38 additions and 38 deletions

View File

@ -138,8 +138,8 @@ svgEditor.addExtension("Markers", function(S) {
var ci;
$.each(mtypes, function(i, pos) {
var m = getLinked(el,"marker-"+pos);
var txtbox = $('#'+pos+'_marker');
var m = getLinked(el, "marker-" + pos);
var txtbox = $('#' + pos + '_marker');
if (!m) {
val = '\\nomarker';
ci = val;
@ -149,7 +149,7 @@ svgEditor.addExtension("Markers", function(S) {
val = '\\' + m.attributes.se_type.textContent;
ci = val;
if (val === '\\textmarker') {
val=m.lastChild.textContent;
val = m.lastChild.textContent;
//txtbox.show(); // show text box
} else {
txtbox.hide(); // hide text box
@ -213,9 +213,9 @@ svgEditor.addExtension("Markers", function(S) {
var text = addElem(marker_types[se_type]);
// have to add text to get bounding box
text.textContent = val;
var tb=text.getBBox();
var tb = text.getBBox();
//alert( tb.x + " " + tb.y + " " + tb.width + " " + tb.height);
var pad=1;
var pad = 1;
var bb = tb;
bb.x = 0;
bb.y = 0;
@ -225,10 +225,10 @@ svgEditor.addExtension("Markers", function(S) {
text.setAttribute('x', pad);
text.setAttribute('y', bb.height - pad - tb.height/4); // kludge?
text.setAttribute('fill',color);
refX = bb.width/2+pad;
refY = bb.height/2+pad;
refX = bb.width/2 + pad;
refY = bb.height/2 + pad;
viewBox = bb.x + " " + bb.y + " " + bb.width + " " + bb.height;
markerWidth =bb.width/10;
markerWidth = bb.width/10;
markerHeight = bb.height/10;
var box = addElem({
@ -459,18 +459,18 @@ svgEditor.addExtension("Markers", function(S) {
panel: 'marker_panel'
});
*/
$.each(mtypes,function(k, pos) {
$.each(mtypes, function (k, pos) {
var listname = pos + "_marker_list";
var def = true;
$.each(marker_types,function(id, v) {
var title = getTitle('en',id);
$.each(marker_types, function (id, v) {
var title = getTitle('en', id);
buttons.push({
id:id_prefix + pos + "_" + id,
svgicon:id,
title:title,
type:'context',
events: { 'click': setArrowFromButton },
panel:'marker_panel',
id: id_prefix + pos + '_' + id,
svgicon: id,
title: title,
type: 'context',
events: {'click': setArrowFromButton},
panel: 'marker_panel',
list: listname,
isDefault: def
});
@ -496,7 +496,7 @@ svgEditor.addExtension("Markers", function(S) {
},{
type: "button-select",
panel: "marker_panel",
title: getTitle('en','start_marker_list'),
title: getTitle('en', 'start_marker_list'),
id: "start_marker_list",
colnum: 3,
events: { change: setArrowFromButton }
@ -512,7 +512,7 @@ svgEditor.addExtension("Markers", function(S) {
},{
type: "button-select",
panel: "marker_panel",
title: getTitle('en','mid_marker_list'),
title: getTitle('en', 'mid_marker_list'),
id: "mid_marker_list",
colnum: 3,
events: { change: setArrowFromButton }
@ -527,7 +527,7 @@ svgEditor.addExtension("Markers", function(S) {
},{
type: "button-select",
panel: "marker_panel",
title: getTitle('en','end_marker_list'),
title: getTitle('en', 'end_marker_list'),
id: "end_marker_list",
colnum: 3,
events: { change: setArrowFromButton }
@ -551,7 +551,7 @@ svgEditor.addExtension("Markers", function(S) {
while(i--) {
var elem = selElems[i];
if(elem && $.inArray(elem.tagName, marker_elems) !== -1) {
if(opts.selectedElement && !opts.multiselected) {
if (opts.selectedElement && !opts.multiselected) {
showPanel(true);
} else {
showPanel(false);