Code Monkey home page Code Monkey logo

Comments (15)

imzbf avatar imzbf commented on August 29, 2024 1

这个需要找时间尝试一下,不确定一定能很好实现

from md-editor-v3.

imzbf avatar imzbf commented on August 29, 2024 1

比起使用滚轮和拖拽的话,按钮技术成本好像又更小一些,考虑在移动端的时候

from md-editor-v3.

imzbf avatar imzbf commented on August 29, 2024 1

这个我也发现了,比较棘手,现在还没有解决方案,先beta着

from md-editor-v3.

bintheext avatar bintheext commented on August 29, 2024

这个需要找时间尝试一下,不确定一定能很好实现
类似这样的实现
https://mermaid.live/edit#pako:eNptkT1vgzAQhv-Kc2sAOYD58JCqUoemUqduFYsFB1gCO3VstRTx32ug2eLp7HueV_LdDLVuEDjc8MuhqvFFis6IsVLEn-dB1hiez8c33StOXnEYNFnrgPT6mwiDZNLu6SG8Y7VQK0J6FIaM-I-uvdCj4eb4YLnbAblsxkZ77fAYv5AWcSCdQWEPEMCIZhSy8b-YV6EC2-OIFXBfNtgKN9gKKrV4VDirPyZVA7fGYQBGu64H3orh5m_u2gh7H8EduQoFfIYf4HFCozIu45yxU5yVLAlg8q80jQqWZwlLy4KmWVEsAfxq7QNolNM0oZTlZVbEeXZiW9zn1tzTsZFWm_d9CbVWrexg-QMhH3yC

github也有优秀的按键;但是最合理是滚轮缩放
mermaid-js/mermaid#1860

image

from md-editor-v3.

imzbf avatar imzbf commented on August 29, 2024

优秀的示例确实可以参考,单独拎出来是很好实现的,只是混合在markdown中,就不太一样了

from md-editor-v3.

bintheext avatar bintheext commented on August 29, 2024

优秀的示例确实可以参考,单独拎出来是很好实现的,只是混合在markdown中,就不太一样了

emm,应该是可以在preview里面实现,隔离开markdown

from md-editor-v3.

imzbf avatar imzbf commented on August 29, 2024

这个意思是只是单独的mermaid模块的话,可以采用组件化的思维封装一个缩放查看的功能。

可是这个编辑器的编译过程虽然有采用模块编译的方式,但是这种方式无法和各大前端框架的组件关联起来,这样就不得不让我们去对页面上已存在的内容做一些改变,比如本来没有的放大、缩小以及调整位置的按钮,我们就得采用原生方式把这些按钮添加进去,然后再考虑绑定事件,改变内容的位置等。

理论上是可以实现的,只是看要多久,要是有现成的,肯定就捡现成的用了

from md-editor-v3.

bintheext avatar bintheext commented on August 29, 2024

或者说,为了降低难度和不影响现有布局,不增加按键;可以针对document.querySelectorAll('p.md-editor-mermaid') 这个标签的元素,增加滚轮缩放的功能

from md-editor-v3.

imzbf avatar imzbf commented on August 29, 2024

不过这种方式可以的话,倒是可以考虑直接导出一个util

from md-editor-v3.

bintheext avatar bintheext commented on August 29, 2024

不过这种方式可以的话,倒是可以考虑直接导出一个util

看技术难度吧,如果太复杂的话,就没必要了,由用户个人实现就行

from md-editor-v3.

bintheext avatar bintheext commented on August 29, 2024

比起使用滚轮和拖拽的话,按钮技术成本好像又更小一些,考虑在移动端的时候

移动端可以像图片一样,点击后悬浮框,支持双指缩放

from md-editor-v3.

imzbf avatar imzbf commented on August 29, 2024

已在beta版本更新

from md-editor-v3.

bintheext avatar bintheext commented on August 29, 2024

已在beta版本更新

功能实现得很优秀,有点小问题,就是缩放好像不是以鼠标位置为中心展开的

2024-08-22.11.31.00.mov

from md-editor-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.