Fix getMarkupString calculation on rectangles

getMarkupString was improperly using inner rectangle width to offset the
top-left corner of the rectangle, which was offsetting the new value by
the difference between group width and rectangle width every time. Use
the proper shape width to calculate that value to make the calculations
consistent.