-
Notifications
You must be signed in to change notification settings - Fork 51
fix(regions): Use relative position and size to support dynamic reps #500
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,6 @@ export type Options = { | |
|
|
||
| export type Props = { | ||
| intl: IntlShape; | ||
| scale: number; | ||
| store: Store; | ||
| }; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,5 +8,5 @@ $region_cursor_32_3x: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAY | |
| } | ||
|
|
||
| .ba-RegionCreator-rect { | ||
| will-change: height, transform, width; | ||
| transform: translateZ(0); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this translate?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems to help performance in Firefox and Safari a bit and has no apparent effect in Chrome. It's the same concept as using |
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,11 @@ | |
|
|
||
| position: absolute; | ||
|
|
||
| // stylelint-disable-next-line declaration-no-important | ||
| box-sizing: content-box !important; // Padding needs to increase the hit area of the button to include the borders | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The other alternative that I considered was to use something like this in |
||
| margin: -#{$border-size-outer}; | ||
| padding: $border-size-outer; | ||
|
|
||
| &::after { | ||
| position: absolute; | ||
| top: $border-size-outer; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import React from 'react'; | ||
|
|
||
| export default React.forwardRef((props, ref: React.Ref<HTMLDivElement>) => <div ref={ref} />); |
Uh oh!
There was an error while loading. Please reload this page.