@@ -109,6 +109,7 @@ function import_config(str, file) {
109
109
} ) ;
110
110
} catch ( e ) {
111
111
N . wire . emit ( 'notify' , t ( 'err_bad_config_format' , { name : file . name } ) ) ;
112
+ /*eslint-disable no-console*/
112
113
console . log ( e ) ;
113
114
}
114
115
}
@@ -205,7 +206,7 @@ function import_svg_font(data/*, file*/) {
205
206
search : [ glyphName ] ,
206
207
svg : {
207
208
path : d ,
208
- width : width
209
+ width
209
210
}
210
211
} ) ;
211
212
} ) ;
@@ -232,6 +233,7 @@ function import_svg_image(data, file) {
232
233
233
234
if ( result . error ) {
234
235
N . wire . emit ( 'notify' , t ( 'err_invalid_format' ) ) ;
236
+ /*eslint-disable no-console*/
235
237
console . error ( result . error ) ;
236
238
return ;
237
239
}
@@ -243,7 +245,7 @@ function import_svg_image(data, file) {
243
245
var skipped = _ . union ( result . ignoredTags , result . ignoredAttrs ) ;
244
246
245
247
if ( skipped . length > 0 ) {
246
- N . wire . emit ( 'notify' , t ( 'err_skiped_tags' , { ' skipped' : skipped . toString ( ) } ) ) ;
248
+ N . wire . emit ( 'notify' , t ( 'err_skiped_tags' , { skipped : skipped . toString ( ) } ) ) ;
247
249
} else if ( ! result . guaranteed ) {
248
250
N . wire . emit ( 'notify' , t ( 'err_merge_path' ) ) ;
249
251
}
@@ -266,8 +268,8 @@ function import_svg_image(data, file) {
266
268
charRef : allocatedRefCode ++ ,
267
269
search : [ glyphName ] ,
268
270
svg : {
269
- path : d ,
270
- width : width
271
+ path : d ,
272
+ width
271
273
}
272
274
} ) ;
273
275
}
@@ -371,7 +373,7 @@ function handleFileSelect(event) {
371
373
////////////////////////////////////////////////////////////////////////////////
372
374
373
375
374
- N . wire . once ( 'navigate.done' , function ( ) {
376
+ N . wire . once ( 'navigate.done' , function page_setup ( ) {
375
377
376
378
//
377
379
// Create regular files selector
@@ -394,7 +396,7 @@ N.wire.once('navigate.done', function () {
394
396
$input . on ( 'change' , handleFileSelect ) ;
395
397
396
398
// handle settings menu click -> open file dialog
397
- N . wire . on ( 'import.start' , function ( ) {
399
+ N . wire . on ( 'import.start' , function open_file_dlg ( ) {
398
400
$input . click ( ) ;
399
401
} ) ;
400
402
@@ -446,7 +448,7 @@ N.wire.once('navigate.done', function () {
446
448
//
447
449
// Setup import listener
448
450
//
449
- N . wire . on ( 'import.obj' , function ( obj ) {
451
+ N . wire . on ( 'import.obj' , function setup_import ( obj ) {
450
452
N . app . fontsList . lock ( ) ;
451
453
452
454
import_config ( JSON . stringify ( obj ) , { } ) ;
0 commit comments