dromara / yft-design

一款美观且功能强大的在线设计工具,具备海报设计和图片编辑功能,基于fabric.js的开源版【稿定设计】。适用于多种场景,如海报生成、电商产品图制作、文章长图设计、视频/公众号封面编辑等 。A beautiful and powerful online design tool
https://pro.yft.design/editor
MIT License
806 stars 176 forks source link

How to create Ruler and Guide line in v6.beta #26

Closed ghost closed 7 months ago

ghost commented 8 months ago

Hello developer I'm having problems implementing rulers and guides on v6 where I can't import some necessary modules and classes. Please help me.

more-strive commented 8 months ago

What is your question?
The rules and guides have already been implemented in the demo

ghost commented 8 months ago

Sorry that my question is not clear I want to create guide line when I drag the ruler down and have a checkered background Screenshot 2024-02-05 093137

more-strive commented 8 months ago

Checked background already exists, but it is not open

20

This feature is currently under development

ghost commented 8 months ago

Yes, can I develop it and add it to your project? and when I drag the mouse from the ruler, this error appears. Can you help me how to register a new class? Guide line class Screenshot 2024-02-05 094100

more-strive commented 8 months ago

image You can register here, I may not be able to achieve it until later

ghost commented 7 months ago

thank sir I was able to add a ruler, but my error now is, once I have added a ruler element, when I hover and move other elements and when I want to add a new ruler element, it crashes. error, please see my code and bugs image image image localhost_4000_design - Google Chrome 2024-02-20 11-43-19

Looking forward to receiving your help

more-strive commented 7 months ago

See the demo console without any errors

ghost commented 7 months ago

That's exactly the problem I'm having, do you have any ideas. The error here is that every time I perform an action (mouse move, click, etc.), a guide line is created when I click on the ruler for example in my photo

more-strive commented 7 months ago

There is currently no good solution. You can submit a PR and I will study it later

ghost commented 7 months ago

hey bro, the white broad, how do i change its size when start image

more-strive commented 7 months ago

There is a template file in the mocks file directory that contains JSON data serialized by fabric.js

ghost commented 7 months ago

yah, I changed the size in the template array, but the whiteboard doesn't cover the entire area I want and the size in the right corner is wrong. image

more-strive commented 7 months ago

Can you create a new issue

ghost commented 7 months ago

Do you have any discord or methods for the community to communicate?

more-strive commented 7 months ago

image You can modify this parameter and try it out

more-strive commented 7 months ago

Updated