various fixes
parent
ef98758752
commit
c4ef6a0ed8
|
@ -48,7 +48,7 @@ if(jQuery)( function() {
|
|||
|
||||
// Get this context menu
|
||||
|
||||
if( el.hasClass('disabled') ) return false;
|
||||
if( el.hasClass('disabled') || evt.altKey ) return false;
|
||||
|
||||
// Detect mouse position
|
||||
var d = {}, x = e.pageX, y = e.pageY;
|
||||
|
|
|
@ -2008,67 +2008,3 @@ span.zoom_tool img {
|
|||
|
||||
#svg_editor #group_title {display: none;}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fanwood';
|
||||
src: url('font-files/fanwood-webfont.eot');
|
||||
src: local('☺'), url('font-files/fanwood-webfont.woff') format('woff'), url('font-files/fanwood-webfont.ttf') format('truetype'), url('font-files/fanwood-webfont.svgz#webfont37hojTTp') format('svg'), url('font-files/fanwood-webfont.svg#webfont37hojTTp') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fanwood';
|
||||
src: url('font-files/fanwood_italic-webfont.eot');
|
||||
src: local('☺'), url('font-files/fanwood_italic-webfont.woff') format('woff'), url('font-files/fanwood_italic-webfont.ttf') format('truetype'), url('font-files/fanwood_italic-webfont.svgz#webfont37hojTTp') format('svg'), url('font-files/fanwood_italic-webfont.svg#webfont37hojTTp') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'sans-serf';
|
||||
src: url('font-files/Junction-webfont.eot');
|
||||
src: local('☺'), url('font-files/Junction-webfont.woff') format('woff'), url('font-files/Junction-webfont.ttf') format('truetype'), url('font-files/Junction-webfont.svgz#webfont37hojTTp') format('svg'), url('font-files/Junction-webfont.svg#webfont37hojTTp') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'League Gothic';
|
||||
src: url('font-files/League_Gothic-webfont.eot');
|
||||
src: local('☺'), url('font-files/League_Gothic-webfont.woff') format('woff'), url('font-files/League_Gothic-webfont.ttf') format('truetype'), url('font-files/League_Gothic-webfont.svgz#webfont37hojTTp') format('svg'), url('font-files/League_Gothic-webfont.svg#webfont37hojTTp') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Museo Slab';
|
||||
src: url('font-files/Museo_Slab-webfont.eot');
|
||||
src: local('☺'), url('font-files/Museo_Slab-webfont.woff') format('woff'), url('font-files/Museo_Slab-webfont.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Museo Slab';
|
||||
src: url('font-files/Museo_Slab_Italic-webfont.eot');
|
||||
src: local('☺'), url('font-files/Museo_Slab_Italic-webfont.woff') format('woff'), url('font-files/Museo_Slab_Italic-webfont.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Anivers';
|
||||
src: url('font-files/Anivers-webfont.eot');
|
||||
src: local('☺'), url('font-files/Anivers-webfont.woff') format('woff'), url('font-files/Anivers-webfont.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Fertigo';
|
||||
src: url('font-files/fertigo-webfont.eot');
|
||||
src: local('☺'), url('font-files/fertigo-webfont.woff') format('woff'), url('font-files/fertigo-webfont.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
|
|
@ -1707,7 +1707,7 @@
|
|||
svgCanvas.bind("extension_added", extAdded);
|
||||
svgCanvas.textActions.setInputElem($("#text")[0]);
|
||||
|
||||
var str = '<div class="palette_item" data-rgb="#none"></div>'
|
||||
var str = '<div class="palette_item" data-rgb="none"></div>'
|
||||
$.each(palette, function(i,item){
|
||||
str += '<div class="palette_item" style="background-color: ' + item + ';" data-rgb="' + item + '"></div>';
|
||||
});
|
||||
|
@ -2061,21 +2061,21 @@
|
|||
top.exports.setEditorFocus();
|
||||
}
|
||||
}
|
||||
if (!$(e.target).hasClass("menu_title") && $('#menu_bar').hasClass("active")) {
|
||||
if (!$(e.target).hasClass("menu_title")) {
|
||||
if(!$(e.target).hasClass("disabled") && $(e.target).hasClass("menu_item")) {
|
||||
blinker(e);
|
||||
return;
|
||||
}
|
||||
$('#menu_bar').removeClass('active')
|
||||
$('.tools_flyout').hide();
|
||||
$('input').blur();
|
||||
if ($("#tools_shapelib").is(":visible") && !$(e.target).parents("#tools_shapelib_show, #tools_shapelib").length)
|
||||
$("#tools_shapelib").hide()
|
||||
if (e.target.nodeName.toLowerCase() != "input") $("input").blur();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.menu_item').live('click', function(e){blinker(e)});
|
||||
$("svg, body").on('click', function(e){closer(e)});
|
||||
$("svg, body").on('mousedown', function(e){closer(e)});
|
||||
var accumulatedDelta = 0
|
||||
var zoomSteps = [6, 12, 16, 33, 50, 66, 100, 150, 200, 300, 400, 600, 800, 1200]
|
||||
$('#workarea').on('mousewheel', function(e, delta, deltaX, deltaY){
|
||||
|
@ -3392,6 +3392,7 @@
|
|||
};
|
||||
|
||||
var updateToolButtonState = function() {
|
||||
/*
|
||||
var bNoFill = (svgCanvas.getColor('fill') == 'none');
|
||||
var bNoStroke = (svgCanvas.getColor('stroke') == 'none');
|
||||
var buttonsNeedingStroke = [ '#tool_fhpath', '#tool_line' ];
|
||||
|
@ -3427,7 +3428,7 @@
|
|||
$(button).removeClass('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
svgCanvas.runExtensions("toolButtonStateUpdate", {
|
||||
nofill: bNoFill,
|
||||
nostroke: bNoStroke
|
||||
|
@ -3446,6 +3447,7 @@
|
|||
});
|
||||
|
||||
operaRepaint();
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
|
@ -3476,10 +3478,9 @@
|
|||
var fillAttr = "none";
|
||||
var ptype = paint.type;
|
||||
var opac = paint.alpha / 100;
|
||||
|
||||
switch ( ptype ) {
|
||||
case 'solidColor':
|
||||
fillAttr = "#" + paint[ptype];
|
||||
fillAttr = (paint[ptype] == 'none' || paint[ptype] == 'one') ? 'none' : "#" + paint[ptype];
|
||||
break;
|
||||
case 'linearGradient':
|
||||
case 'radialGradient':
|
||||
|
@ -4033,7 +4034,7 @@
|
|||
{sel:'#tool_move_down', fn: moveDownSelected, evt:'click', key: [modKey+'down', true]},
|
||||
{sel:'#tool_topath', fn: convertToPath, evt: 'click'},
|
||||
{sel:'#tool_make_link,#tool_make_link_multi', fn: makeHyperlink, evt: 'click'},
|
||||
{sel:'#tool_undo', fn: clickUndo, evt: 'click', key: [modKey + 'Z', true]},
|
||||
{sel:'#tool_undo', fn: clickUndo, evt: 'click'},
|
||||
{sel:'#tool_redo', fn: clickRedo, evt: 'click', key: ['Y', true]},
|
||||
{sel:'#tool_clone,#tool_clone_multi', fn: clickClone, evt: 'click', key: [modKey + 'D', true]},
|
||||
{sel:'#tool_group', fn: clickGroup, evt: 'click', key: [modKey + 'G', true]},
|
||||
|
|
|
@ -6998,7 +6998,7 @@ this.setPaint = function(type, paint) {
|
|||
switch ( p.type ) {
|
||||
case "solidColor":
|
||||
|
||||
if (p.solidColor != "none") {
|
||||
if (p.solidColor != "none" && p.solidColor != "#none") {
|
||||
this.setColor(type, "#"+p.solidColor)
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -60,7 +60,7 @@ break;case -1:$(this).removeClass(this.spinCfg.upClass).addClass(this.spinCfg.do
|
|||
m=f.shiftKey?c.spinCfg.smallStep:c.spinCfg.step,o=function(){c.adjustValue(c.spinCfg._direction*m)};o();c.spinCfg._delay=window.setTimeout(function(){o();c.spinCfg._repeat=window.setInterval(o,c.spinCfg.interval)},c.spinCfg.delay)}}).mouseup(function(){window.clearInterval(this.spinCfg._repeat);window.clearTimeout(this.spinCfg._delay)}).dblclick(function(){$.browser.msie&&this.adjustValue(this.spinCfg._direction*this.spinCfg.step)}).keydown(function(f){switch(f.keyCode){case 38:this.adjustValue(this.spinCfg.step);
|
||||
break;case 40:this.adjustValue(-this.spinCfg.step);break;case 33:this.adjustValue(this.spinCfg.page);break;case 34:this.adjustValue(-this.spinCfg.page)}}).keypress(function(f){if(this.repeating)switch(f.keyCode){case 38:this.adjustValue(this.spinCfg.step);break;case 40:this.adjustValue(-this.spinCfg.step);break;case 33:this.adjustValue(this.spinCfg.page);break;case 34:this.adjustValue(-this.spinCfg.page)}else this.repeating=true}).keyup(function(f){this.repeating=false;switch(f.keyCode){case 38:case 40:case 33:case 34:case 13:this.adjustValue(0)}}).bind("mousewheel",
|
||||
function(f){if(f.wheelDelta>=120)this.adjustValue(this.spinCfg.step);else f.wheelDelta<=-120&&this.adjustValue(-this.spinCfg.step);f.preventDefault()}).change(function(){this.adjustValue(0)});this.addEventListener&&this.addEventListener("DOMMouseScroll",function(f){if(f.detail>0)this.adjustValue(-this.spinCfg.step);else f.detail<0&&this.adjustValue(this.spinCfg.step);f.preventDefault()},false)})};function touchHandler(a){var n=a.changedTouches,f=n[0],c="";switch(a.type){case "touchstart":c="mousedown";break;case "touchmove":c="mousemove";break;case "touchend":c="mouseup";break;default:return}var m=document.createEvent("MouseEvent");m.initMouseEvent(c,true,true,window,1,f.screenX,f.screenY,f.clientX,f.clientY,false,false,false,false,0,null);if(n.length<2){f.target.dispatchEvent(m);a.preventDefault()}};jQuery&&function(){var a=$(window),n=$(document);$.extend($.fn,{contextMenu:function(f,c){if(f.menu==undefined)return false;if(f.inSpeed==undefined)f.inSpeed=150;if(f.outSpeed==undefined)f.outSpeed=75;if(f.inSpeed==0)f.inSpeed=-1;if(f.outSpeed==0)f.outSpeed=-1;$(this).each(function(){var m=$(this),o=$(m).offset(),b=$("#"+f.menu);b.addClass("contextMenu");$(this).bind("mousedown",function(d){$(this).mouseup(function(e){var l=$(this);l.unbind("mouseup");$(".contextMenu").hide();if(d.button===2||f.allowLeft||
|
||||
d.ctrlKey&&svgedit.browser.isMac()){e.stopPropagation();if(m.hasClass("disabled"))return false;var u=e.pageX,z=e.pageY;e=a.width()-b.width();var p=a.height()-b.height();if(u>e-15)u=e-15;if(z>p-30)z=p-30;n.unbind("click");b.css({top:z,left:u}).fadeIn(f.inSpeed);b.find("A").mouseover(function(){b.find("LI.hover").removeClass("hover");$(this).parent().addClass("hover")}).mouseout(function(){b.find("LI.hover").removeClass("hover")});n.keypress(function(L){switch(L.keyCode){case 38:if(b.find("LI.hover").length){b.find("LI.hover").removeClass("hover").prevAll("LI:not(.disabled)").eq(0).addClass("hover");
|
||||
d.ctrlKey&&svgedit.browser.isMac()){e.stopPropagation();if(m.hasClass("disabled")||d.altKey)return false;var u=e.pageX,z=e.pageY;e=a.width()-b.width();var p=a.height()-b.height();if(u>e-15)u=e-15;if(z>p-30)z=p-30;n.unbind("click");b.css({top:z,left:u}).fadeIn(f.inSpeed);b.find("A").mouseover(function(){b.find("LI.hover").removeClass("hover");$(this).parent().addClass("hover")}).mouseout(function(){b.find("LI.hover").removeClass("hover")});n.keypress(function(L){switch(L.keyCode){case 38:if(b.find("LI.hover").length){b.find("LI.hover").removeClass("hover").prevAll("LI:not(.disabled)").eq(0).addClass("hover");
|
||||
b.find("LI.hover").length||b.find("LI:last").addClass("hover")}else b.find("LI:last").addClass("hover");break;case 40:if(b.find("LI.hover").length==0)b.find("LI:first").addClass("hover");else{b.find("LI.hover").removeClass("hover").nextAll("LI:not(.disabled)").eq(0).addClass("hover");b.find("LI.hover").length||b.find("LI:first").addClass("hover")}break;case 13:b.find("LI.hover A").trigger("click");break;case 27:n.trigger("click")}});b.find("A").unbind("mouseup");b.find("LI:not(.disabled) A").mouseup(function(){n.unbind("click").unbind("keypress");
|
||||
$(".contextMenu").hide();c&&c($(this).attr("href").substr(1),$(l),{x:u-o.left,y:z-o.top,docX:u,docY:z});return false});setTimeout(function(){n.click(function(){n.unbind("click").unbind("keypress");b.fadeOut(f.outSpeed);return false})},0)}})});if($.browser.mozilla)$("#"+f.menu).each(function(){$(this).css({MozUserSelect:"none"})});else $.browser.msie?$("#"+f.menu).each(function(){$(this).bind("selectstart.disableTextSelect",function(){return false})}):$("#"+f.menu).each(function(){$(this).bind("mousedown.disableTextSelect",
|
||||
function(){return false})});$(m).add($("UL.contextMenu")).bind("contextmenu",function(){return false})});return $(this)},disableContextMenuItems:function(f){if(f==undefined){$(this).find("LI").addClass("disabled");return $(this)}$(this).each(function(){if(f!=undefined)for(var c=f.split(","),m=0;m<c.length;m++)$(this).find('A[href="'+c[m]+'"]').parent().addClass("disabled")});return $(this)},enableContextMenuItems:function(f){if(f==undefined){$(this).find("LI.disabled").removeClass("disabled");return $(this)}$(this).each(function(){if(f!=
|
||||
|
|
Loading…
Reference in New Issue