remove svg layer, html all the things, rs to tl (#1227)
This PR has been hijacked! 🗑️🦝🦝🦝 The <Canvas> component was previously split into an <SVGLayer> and an <HTMLLayer>, mainly due to the complexity around translating SVGs. However, this was done before we learned that SVGs can have overflow: visible, so it turns out that we don't really need the SVGLayer at all. This PR now refactors away SVG Layer. It also updates the class name prefix in editor from `rs-` to `tl-` and does a few other small changes. --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This commit is contained in:
parent
986ffc1dd6
commit
dc16ae1b12
56 changed files with 898 additions and 804 deletions
|
@ -42,7 +42,7 @@ export const TextLabel = React.memo(function TextLabel<
|
|||
|
||||
return (
|
||||
<div
|
||||
className="rs-text-label"
|
||||
className="tl-text-label"
|
||||
data-font={font}
|
||||
data-align={align}
|
||||
data-hastext={!isEmpty}
|
||||
|
@ -50,7 +50,7 @@ export const TextLabel = React.memo(function TextLabel<
|
|||
data-textwrap={!!wrap}
|
||||
>
|
||||
<div
|
||||
className="rs-text-label__inner"
|
||||
className="tl-text-label__inner"
|
||||
style={{
|
||||
fontSize: LABEL_FONT_SIZES[size],
|
||||
lineHeight: LABEL_FONT_SIZES[size] * TEXT_PROPS.lineHeight + 'px',
|
||||
|
@ -59,14 +59,14 @@ export const TextLabel = React.memo(function TextLabel<
|
|||
color: labelColor,
|
||||
}}
|
||||
>
|
||||
<div className="rs-text rs-text-content" dir="ltr">
|
||||
<div className="tl-text tl-text-content" dir="ltr">
|
||||
{TextHelpers.normalizeTextForDom(text)}
|
||||
</div>
|
||||
{isInteractive ? (
|
||||
// Consider replacing with content-editable
|
||||
<textarea
|
||||
ref={rInput}
|
||||
className="rs-text rs-text-input"
|
||||
className="tl-text tl-text-input"
|
||||
name="text"
|
||||
tabIndex={-1}
|
||||
autoComplete="false"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue