Giter VIP home page Giter VIP logo

Comments (11)

Runtus avatar Runtus commented on May 23, 2024 2

大佬想问下这个label自动调整需求是设置成默认生效吗?

不是,是类似于 overflowHide 一样,组成一个配置,大部分代码都是可以参考的。

好的明白了,配置也是和overlap一样在transform之下吗?

from g2.

Runtus avatar Runtus commented on May 23, 2024 1

我认领这个任务

from g2.

Runtus avatar Runtus commented on May 23, 2024 1

@hustcc 大佬,我这更新对应文档时,需要放一个图片在md里,需要麻烦你帮忙上传到cdn上。
image

from g2.

hustcc avatar hustcc commented on May 23, 2024 1

@Runtus

使用这个地址:https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*B2GwQbqkH_kAAAAAAAAAAAAADmJ7AQ/original

from g2.

Runtus avatar Runtus commented on May 23, 2024 1

因为还没有看到 pr 的代码,所以在这里提前提醒一下,exceed 之后 Adjust 的策略:

adjust 的方向是 exceed 方向的反方向。

举个栗子:

  • 如果是右侧超出,那么就像左边调整位置
  • 如果是右下超出,那就向左上调整位置

注意处理整个画布都小于 label 大小的时候,不要出现代码的死循环。

ok 不好意思,我想的是先把那个文档一起完善了一起提个pr,我明天把pr提上来

from g2.

hustcc avatar hustcc commented on May 23, 2024

image

如上图,标记区域的 label 应该自动向左移动,防止超出画布被剪裁。

from g2.

Runtus avatar Runtus commented on May 23, 2024

大佬想问下这个label自动调整需求是设置成默认生效吗?

from g2.

hustcc avatar hustcc commented on May 23, 2024

大佬想问下这个label自动调整需求是设置成默认生效吗?

不是,是类似于 overflowHide 一样,组成一个配置,大部分代码都是可以参考的。

from g2.

hustcc avatar hustcc commented on May 23, 2024

#6199 这个问题是同类问题,可以熟悉之后,一起看看~

from g2.

Runtus avatar Runtus commented on May 23, 2024

#6199 这个问题是同类问题,可以熟悉之后,一起看看~

get

from g2.

hustcc avatar hustcc commented on May 23, 2024

因为还没有看到 pr 的代码,所以在这里提前提醒一下,exceed 之后 Adjust 的策略:

adjust 的方向是 exceed 方向的反方向。

举个栗子:

  • 如果是右侧超出,那么就像左边调整位置
  • 如果是右下超出,那就向左上调整位置

注意处理整个画布都小于 label 大小的时候,不要出现代码的死循环。

from g2.

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.