3 Replies Latest reply on Jan 16, 2015 8:39 AM by matias.kiviniemi

    Help! artlayer.textItem returns undefined when asked for a valid property like baselineShift

    germanb Level 1

      This is driving me nuts:
      When asking for a property of a textItem like baselineShift, and that property has not been manually set by the user before, it returns undefined even though it may have a default value, as evidenced in the Character properties panel. Is there a workaorund to this bug?

       

      To replicate:

       

      • Put a paragraph style textfield into your document

      • Put in some text

      • Do not change any of the default values

      • alert(app.activeDocument.activeLayer.textItem.baselineShift)

      [ result: undefinded]

       

      • Now set the baseline shift in the properties panel to say 15

      • alert(app.activeDocument.activeLayer.textItem.baselineShift)

      [ result: 15 px]