used svgedit.browser checks instead of redefined ones

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2422 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Bruno Heridet 2013-02-18 18:22:00 +00:00
parent 15d765de85
commit 5ce4431658
1 changed files with 3 additions and 5 deletions

View File

@ -513,9 +513,7 @@
'#aaffaa', '#aaffd4', '#aaffff', '#aad4ff',
'#aaaaff', '#d4aaff', '#ffaaff', '#ffaad4'
],
isMac = (navigator.platform.indexOf('Mac') >= 0),
isWebkit = (navigator.userAgent.indexOf('AppleWebKit') >= 0),
modKey = (isMac ? 'meta+' : 'ctrl+'), // ⌘
modKey = (svgedit.browser.isMac() ? 'meta+' : 'ctrl+'), // ⌘
path = svgCanvas.pathActions,
undoMgr = svgCanvas.undoMgr,
Utils = svgedit.utilities,
@ -1339,7 +1337,7 @@
$.svgIcons(svgicons, {
w:24, h:24,
id_match: false,
no_img: (!isWebkit),
no_img: (!svgedit.browser.isWebkit()),
fallback: fallback_obj,
placement: placement_obj,
callback: function(icons) {
@ -3271,7 +3269,7 @@
// switch modifier key in tooltips if mac
// NOTE: This code is not used yet until I can figure out how to successfully bind ctrl/meta
// in Opera and Chrome
if (isMac && !window.opera) {
if (svgedit.browser.isMac() && !window.opera) {
var shortcutButtons = ['tool_clear', 'tool_save', 'tool_source', 'tool_undo', 'tool_redo', 'tool_clone'];
var i = shortcutButtons.length;
while (i--) {