Pārlūkot izejas kodu

Fixed: the Decoration element is not aligned to right when in RTL mode

MarcinZiabek 3 gadi atpakaļ
vecāks
revīzija
2a0e91af68
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      QuestPDF/Elements/Decoration.cs

+ 1 - 1
QuestPDF/Elements/Decoration.cs

@@ -68,7 +68,7 @@ namespace QuestPDF.Elements
                 
                 
                 var offset = ContentDirection == ContentDirection.LeftToRight
                 var offset = ContentDirection == ContentDirection.LeftToRight
                     ? command.Offset
                     ? command.Offset
-                    : new Position(availableSpace.Width - command.Offset.X - command.Measurement.Width, command.Offset.Y);
+                    : new Position(availableSpace.Width - width, command.Offset.Y);
                 
                 
                 Canvas.Translate(offset);
                 Canvas.Translate(offset);
                 command.Element.Draw(elementSize);
                 command.Element.Draw(elementSize);