Jump to content

Pizza menus


Recommended Posts

Hello, we have a client with a set of pizza menus that differ depending on the location they're used in. Some pizza items take up 3 lines of space, while others take 2 lines of space. We have been trying to shift the items depending on if there is a 3 liner pizza. Unfortunately, this has caused spacing issues where there are multiple 3 liner pizzas. We would brute force but there are 7 pizza slots on the menu so the number of cases we would programmatically address will be greater than 130. Essentially equivalent to writing 130 if-statements to address every possible combination of menus.

Is there a better way to go about this?

Additionally, in our client's menu, we have attempted to programmatically shift a separator / black line to improve spacing, so that it is relative to the position of the pizza before it. For some reason, the following code is not able to change the position of our separator. OnRecordStart

// Menu layout:
//
// 🍕 #1
// 🍕 #2 (takes more space than #1)
// Separator
// More 🍕

//OK, lets move everything below #2 down a little

FindTextFrame("Tier1_Pizza2").y += shiftValue10; // move 🍕 #2 down by x
FindTextFrame("Separator").y = FindTextFrame("Tier1_Pizza2").y; // move the separator down to our new y-coordinate for 🍕 #3
FindTextFrame("Separator").y += shiftValue10; // Does nothing. Any ideas?

Using Fusion Pro 12.1.1 adobe plugin on windows 10.

 

Thanks!,

Amogh

Link to comment
Share on other sites

The last line in your sample code works fine for me. It does in fact move the frame down by whatever value is specified by shiftValue10.

My questions would be, are you using FusionPro Producer or Server? The other versions do not support x and y movement control. If so, are you using hundredths of points?

Also, why do this with multiple text frames when it seems you could just do it inline in a single frame? It's really hard to tell what you are going for without a visual.

  • Like 1
Link to comment
Share on other sites

Thanks @ThomasLewis for jumping in on this.

Starting in version 13, even Creator and Designer licenses can move and resize frames. Prior versions required the server/producer versions, but we lifted that restriction starting in 13.

Agreed, a screen shot would help to resolve this. We can probably just do it in one frame.

BTW very cool having the pizza emoji in the JavaScript. I didn't know we could do that!

I think perhaps, though there might be a logic problem. This code:

FindTextFrame("Tier1_Pizza2").y += shiftValue10; // move 🍕 #2 down by x
FindTextFrame("Separator").y = FindTextFrame("Tier1_Pizza2").y; // move the separator down to our new y-coordinate for 🍕 #3
FindTextFrame("Separator").y += shiftValue10; // Does nothing. Any ideas?

The separator frame will be at the same y position as the Tier1_Pizza2 frame's TOP plus the shiftValue10. I think you want the separator below pizza2 plus the shiftValue (right)? That would mean you want the separator frame to include the height of the Tier1_Pizza2 frame, like this:

FindTextFrame("Tier1_Pizza2").y += shiftValue10; // move 🍕 #2 down by x
FindTextFrame("Separator").y = FindTextFrame("Tier1_Pizza2").y  +   FindTextFrame("Tier1_Pizza2").height ;      // move the separator down to our new y-coordinate for 🍕 #3
FindTextFrame("Separator").y += shiftValue10; // Does nothing. Any ideas?

Is that maybe what you want?

Or if the separator was already at the right spot you could just use the += shiftValue10 on the separator frame to push both down.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...