moveable icon indicating copy to clipboard operation
moveable copied to clipboard

How can I set moveable object to auto expand its width to left.

Open hayk-front opened this issue 3 years ago • 2 comments

Environments

  • Framework name: React
  • Framework version: 16.9.0
  • Moveable Component version: 0.29.0
  • Testable Address(optional):

Description

I have a canvas area, which includes REACT-MOVEABLE < SPAN > element, which has < P > child element and I can type-change a text in that P element.

When I set CSS text-align: right, for my inner < p > element or for < span > element, and start typing some text, its size start to increase, but moveable < span > wrapper auto expand its width to right side (because it has auto-generated "transform: translate" when you drag it)), but it should expand to LEFT to get correct 'text-align: right' typing standard.

So I would kindly ask, is there any solution/prop type which can help me in this situation, or I should find a way and write the whole functionality by myself ? Thank you.

hayk-front avatar Jun 08 '22 08:06 hayk-front

@hayk-front

Probably the most difficult problem in Moveable.

It's hard to fix right now, but someday I'll fix it.

daybrush avatar Jun 09 '22 15:06 daybrush

@daybrush Thank you for letting me know. OK, I will try to solve the problem in my case. I will share the result later.

hayk-front avatar Jun 10 '22 06:06 hayk-front