Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复createLine因pointList为空而报错的问题。 #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zhiqinyigu
Copy link

iPhone 6s IOS9的points有可能为空,因为highlight()里rect.width === 0。

iPhone 6s IOS9的points有可能为空,因为rect.width === 0。
@zhiqinyigu
Copy link
Author

@leaves4j 哈喽,可以抽空看一下这个问题发个版吗?

@leaves4j
Copy link
Collaborator

leaves4j commented Mar 3, 2021

请提供一下具体的异常信息和复现 case

@zhiqinyigu
Copy link
Author

就是同一些笔记标记,在电脑没问题,其它手机没测,只是在我的ios9出现。
这个应该是设备原因, TextNode.getSelectNodeRectAndText取得的rect.width又可能为0(多出来的数据),导致的。

image
image

@zhiqinyigu
Copy link
Author

我给一下log信息你吧

@zhiqinyigu
Copy link
Author

zhiqinyigu commented Mar 3, 2021

step 1: 这里是createLine,现在肉眼分析可知e[2]或e[3]为空时会报错

image

step 2: 这里在createLine的上游提前输出一些信息

image

step 3: 请求我们项目的笔记数据后调用highlightLines。

image

step 4: iPhone 6s(IOS9)下有报错,我们看看points和relativeRects

image
image

step 5: PC下没有报错,我们看看points和relativeRects,比iPhone 6s(IOS9)少一项多余的

image

@zhiqinyigu
Copy link
Author

@leaves4j 看看我要怎么协助你 😂,这个是跟设备关联的,不是代码的问题。计算points那部分的代码我没有深入看。

[fix] EasyMarker元素被富文本背景色挡住的问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants