Jump to content

Copyfit Warning when field is blank


dreimer

Recommended Posts

Is there a way to edit the rule so that I don't get a warning if the field in the data is blank. I still want the warning if the copy won't fit in the text box, just not when the field is blank.

if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72)))
   ReportWarning("Could not copyfit text in flow " + 
                 FusionPro.Composition.CurrentFlow.name);

Link to comment
Share on other sites

Did you see this thread? More specifically: this post.

 

If that solution doesn't work for you, I suppose you could try:

var cf = FusionPro.Composition.CurrentFlow;
var fit = cf.fits && !cf.expandToFill;

if (!fit)
   fit = +!RawTextFromTagged(cf.content.replace(/<variable name="([^"]*)">/g, function(s,p){return RuleOrField(p);}));

if (!fit && !Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72)))
   ReportWarning("Could not copyfit text in flow " + 
       FusionPro.Composition.CurrentFlow.name);

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...