When the file has a region comment, if the file cannot be found. Appears when you edit area notes after adding them manually. TypeError: Cannot read property 'clearRect' of undefined
When the following file path is changed to a nonexistent path, it will appear normally:
File Not Found! File "../../data/sample_img_debug/adutta_swan.jpg" not found. VIA application will automatically reload this file when you update one of the properties below.
file:_via_debug_project.js---865
_via_dp[4]['store']['config'] = {
'file': {
'loc_prefix': {
'1':'',
'2':'',
'3':'../../data/sample_img_debug/',
'4':'',
},
},
'ui': {
'file_content_align':'center'
}
};
The correct path is modified, and the picture and annotation are displayed normally. When the annotation area is moved, an error occurs and cannot be moved
TypeError: Cannot read property 'clearRect' of undefined
at _via_file_annotator._creg_clear (_via_file_annotator.js:1330)
at _via_file_annotator._creg_draw_all (_via_file_annotator.js:1334)
at _via_file_annotator._on_event_metadata_update (_via_file_annotator.js:1835)
at _via_data._via_event.emit_event (_via_event.js:41)
at _via_data.<anonymous> (_via_data.js:439)
at new Promise (<anonymous>)
at _via_data.metadata_update_xy (_via_data.js:426)
at _via_file_annotator.<anonymous> (_via_file_annotator.js:1116)
at new Promise (<anonymous>)
at _via_file_annotator._metadata_move_region (_via_file_annotator.js:1107)
This problem is due to different paths when importing projects from other computers.
I found out when I studied via2 metadata import. This problem does not exist for newly added files My code is in GitHub and it's not public
Edited by get-Resource