feat: trigger event when mouse over/leave element in onlyrender-status

This commit is contained in:
chenshenhai 2021-08-08 16:56:55 +08:00
parent 9aca4a03cd
commit 2290643fd2
2 changed files with 3 additions and 2 deletions

View file

@ -18,6 +18,7 @@ const core = new Core(mount, {
contextWidth: 600,
contextHeight: 400,
devicePixelRatio: 4,
onlyRender: true,
}, {
scrollWrapper: {
use: true,

View file

@ -382,10 +382,10 @@ class Core {
let isMouseOverElement: boolean = false;
if (this[_mode] === Mode.SELECT_AREA) {
this[_board].resetCursor();
if (this[_onlyRender] !== true) this[_board].resetCursor();
} else if (this[_cursorStatus] === CursorStatus.NULL) {
const { cursor, elementUUID } = this[_mapper].judgePointCursor(point, this[_data]);
this[_board].setCursor(cursor);
if (this[_onlyRender] !== true) this[_board].setCursor(cursor);
if (elementUUID) {
const index: number | null = this[_helper].getElementIndexByUUID(elementUUID);
if (index !== null && index >= 0) {