getOffsetOfNonStrictMode method

Offset getOffsetOfNonStrictMode(
  1. BuildContext context
)

calculate and return the script offset for non strict mode.

Implementation

Offset getOffsetOfNonStrictMode(BuildContext context) {
  if (type == EnumSpWMLElementType.superscript) {
    return Offset(
        0,
        _amplifiedValue(getFontSize(context)!, 1.225) / 4 +
            getFontSize(context)! / 2 +
            (-1 * super.getFontSize(context)!) +
            elParams.p.baselineCorrection);
  } else {
    return Offset(
        0,
        _amplifiedValue(getFontSize(context)!, 1.225) / 4 +
            elParams.p.baselineCorrection);
  }
}