Preview doesn't display dynamic size repeater items like the Inpector


#1

Here’s the issue I’m dealing with. The left is the inspector where I’ve laid everything out. On the right is the output in the preview pane. Ignore the distortion, as it is an issue with the image and not the program. My repeater has on the right a dynamic panel that fits the content inside. The panel has either the full-width rectangle of most rows or the stub rectangle of the “Today” item. Why does the preview not match the inspector and is there a workaround that still allows me to use the repeater?


#2

Hi!

Are you performing an Update command on the repeater, or a sort? If so, this is a known bug: doing so causes the repeater to forget that it’s a fit-to-html-content repeater.


#3

I’m not doing anything apart from onItemLoad set panel and set text for each item. Would that count?


#4

Hmmm. No, that should be fine. Are you able to post your file?


#5

Here it is.
Issue.rp (531 KB)


#6

Bump. Anyone have any idea about this?


#7

Hi!

Wow, I have no idea why the preview is showing your rectangles sizing to the wrapped text. When Axure publishes, it makes bitmaps out of the shapes, and it doesn’t resize the bitmaps to conform to wrapping text.

Drag the stock repeater onto a page make the Column0 text long enough to wrap, and make the text of the rectangle top-aligned. THAT is the unfortunate normal behavior of a repeater, where the repeater resizes to the wrapped text but the rectangles don’t.

I am completely at a loss (and frankly am in awe) on how you got got preview to do what it’s doing.

What IS breaking the ever-so-fragile (and thus, completely useless) “Fit to Content in HTML” feature here is that you are setting the state of a dynamic panel inside the repeater. That’s all it takes to break the feature!

Attached is a workaround. I added a numLines column to the repeater with the number of wrapped lines each row has. (E.g., numLines for the last row is 5.) I then add the following code for the panel containing the Brand and White states (the longer blue and white rectangles)

Set Size of (Dynamic Panel) to 270, [[numLines * 19 + 20]]

(20 is the height of your top/bottom padding, and 19 is the line height of the text)

The panel that gets resized has an OnResize handler that sizes/moves the objects inside of each state. Because the rectangle is converted to a bitmap, just resizing the rectangle in code would distort the rounded corners, so both the white and blue speech bubbles now consist of three rectangles: a top one with its two top corners rounded, a middle rectangle with the text (0 corner radius), and a bottom rectangle with just bottom rounded corners.

When the panel resizes, it resizes both middle panels appropriately and moves both bottom rectangles appropriately.

Issue.rp (544 KB)


Not fitting with "Fit to Content in HTML" in Repeater when DP state change or show/hide from Action
#8

Have come across these symptoms - but in different circumstances.
I was using a repeater in a project with customised adaptive views - fine in Axure preview - didn’t fit text in browser preview.

Anthony Axure in support looked into it - one for him maybe? There was no solution - but it was logged.

MG


#9

Thanks for the workaround. This version of axure seems to have a few more issues than I’ve previously seen. I’m thinking of rolling back till it’s a more mature product.


#10

Hi kindred (et al.),

I’ve taken note of this thread and logged this discussion for our product team. It looks like Joseph’s workaround has got things squared away here. In case it’s helpful, I also wanted to hop in with some context for the time being. As Mike may have alluded to, auto-fit currently applies only to text set within the editor; shapes don’t auto-fit to dynamically-set text in the browser output. This is a notable point of confusion; it’s come up a fair amount and I’ll be updating our product team to review.

Best,
Alex


Not fitting with "Fit to Content in HTML" in Repeater when DP state change or show/hide from Action
#11

Hi Alex -

Can you explain why in kindred’s file the rectangle IS sizing to its text when viewed in Axure itself? (See the top image, as well as kindred’s file.) The stock repeater doesn’t do that.


#12

Hi Joseph,

In kindred’s file, it looks like they had turned on the editor setting for autofit-width and autofit-height, for the shape widget of the repeater item. When those settings are enabled, the resize handles of the shape then toggles from white to yellow. Here’s a screenshot showing the yellow resize handles, the autofit buttons in the Inspector Style pane, along with some padding settings that seem to influence the apparent styling of the widgets in the repeater:

Screenshot | Autofit

Autofit can be toggled in the editor by double-clicking the resize handles of a shape or by selecting the respective buttons in the Inspector Style Pane. By default, the shape widget of the stock repeater has that setting turned off.

HTH!
Alex


unlisted #13