modify editing

This commit is contained in:
kekee000 2015-06-11 17:22:42 +08:00
parent 10268f6a8d
commit 1362a6f9e1
2 changed files with 8 additions and 3 deletions

View File

@ -73,7 +73,7 @@ define(
$('.editor').removeClass('editing');
program.editor && program.editor.hide();
program.viewer.clearEditing();
program.viewer.setMode('list');
program.viewer.focus();
}

View File

@ -22,8 +22,13 @@ define(
$('#setting-glyf-unicode').on('blur', function (e) {
var val = $(this).val();
var ctlGlyfName = $('#setting-glyf-name');
if (!ctlGlyfName.val() && val.match(unicodeREG)) {
val = Number('0x' + val.split(',')[0].slice(1));
if (!ctlGlyfName.val()) {
if (val.match(unicodeREG)) {
val = Number('0x' + val.split(',')[0].slice(1));
}
else if (val) {
val = val.charCodeAt(0);
}
ctlGlyfName.val(string.getUnicodeName(val));
}
});