fix: @idraw/core screenSelectElement trigger wrong uuid

This commit is contained in:
chenshenhai 2021-06-08 18:08:40 +08:00
parent c05921e0e8
commit f04f66f092
2 changed files with 4 additions and 4 deletions

View file

@ -212,7 +212,7 @@ class Core {
this[_selectedDotDirection] = direction;
this[_selectedUUID] = uuid;
} else {
const [index] = this[_element].isPointInElement(point, this[_data]);
const [index, uuid] = this[_element].isPointInElement(point, this[_data]);
this.selectElement(index);
if (typeof uuid === 'string' && this[_coreEvent].has('screenSelectElement')) {
this[_coreEvent].trigger(

View file

@ -28,13 +28,13 @@ export class Renderer {
});
// TODO
this._loader.on('load', (res) => {
console.log('load: ', res);
// console.log('load: ', res);
});
this._loader.on('error', (res) => {
console.log('error: ', res);
// console.log('error: ', res);
});
this._loader.on('complete', (res) => {
console.log('complete: ', res);
// console.log('complete: ', res);
})
}