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

编辑与预览模式通开时,左侧编辑与右侧预览同步好别扭 #99

Closed
wakaryry opened this issue Jun 4, 2015 · 5 comments

Comments

@wakaryry
Copy link

wakaryry commented Jun 4, 2015

编辑与预览通开时,左侧的编辑与右侧预览感觉别扭。案例应该是右侧的预览与左侧要同步的,左侧加一行,然后右侧同步中新添加的内容应该是要能够看到的,可是看不到呀。就只有在左侧enter换行时,右侧闪出最下边的内容,然后右侧又往上回滚一段距离,最下边又看不到了。

编辑的时候右侧最下边保持左侧光标所在位置比较好。

slide

@pandao
Copy link
Owner

pandao commented Jun 4, 2015

@wakaryry 不太清楚你说的具体是什么。但是要说的是无法精确到光标位置,因为解析后的内容的实际高度“无法”计算,自然也无法精确定位。

如果不想使用现有的同步滚动,可以关闭配置:

{
    syncScrolling : false
}

@wakaryry
Copy link
Author

wakaryry commented Jun 5, 2015

@pandao 我的意思是我即使在最底部编辑的时候,实时预览也不是滑到最底部。而我enter一下,实时预览就马上闪一下,突然跳到底部,然后又往上滑移一段距离。

定位的话,我想可以先按照H标题进行大概定位,然后估计就要对内容进行识别来精确定位了。

谢谢

@pandao
Copy link
Owner

pandao commented Jun 5, 2015

@wakaryry 可能是 change 后,重新解析流程图或公式等时(它们是延迟解析的),导致了新的高度,而现在没有在流程图等没有解析后再重新定位滚动位置,可以再改进一下。

@pandao
Copy link
Owner

pandao commented Jun 9, 2015

@wakaryry v1.5.0 改进了同步定位的精度。

@wakaryry
Copy link
Author

wakaryry commented Jun 9, 2015

@pandao
Nice。
过段时间再换成这个1.5.0版本的,到时去具体测试下。

@wakaryry wakaryry closed this as completed Jun 9, 2015
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

No branches or pull requests

2 participants