Open
Conversation
Author
|
当页面存在缩放的时候, 在计算 offset 相对位置时将缩放比例放进去, 使其变成真实偏移量。 |
1 task
afc163
reviewed
Feb 22, 2023
| } | ||
| if ('top' in offset) { | ||
| resultXY.y = originalXY.y + offset.top - originalOffset.top; | ||
| resultXY.y = originalXY.y + offset.top - originalOffset.top ; |
Contributor
There was a problem hiding this comment.
Suggested change
| resultXY.y = originalXY.y + offset.top - originalOffset.top ; | |
| resultXY.y = originalXY.y + offset.top - originalOffset.top; |
afc163
reviewed
Feb 22, 2023
examples/simple.js
Outdated
| ReactDOM.render(div, $id('__react-content')); | ||
|
|
||
| document.body.style.transform = 'scale(0.9)' | ||
| document.body.style.transformOrigin = 'top left' |
Contributor
|
@zombieJ 这个问题切到 @rc-component/trigger 后能解么? |
Collaborator
能,新的实现是直接按照最终画板计算的:https://ant.design/docs/blog/tooltip-align-cn#%E7%BC%A9%E6%94%BE%E6%AF%94 |
|
不发版吗 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#55