mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fix negative bounds height on PointText.
This commit is contained in:
parent
2196ef2a74
commit
463a00bd1e
1 changed files with 3 additions and 3 deletions
|
@ -108,11 +108,11 @@ var PointText = TextItem.extend(/** @lends PointText# */{
|
|||
// Adjust for different justifications
|
||||
if (justification !== 'left')
|
||||
x -= width / (justification === 'center' ? 2: 1);
|
||||
// Until we don't have baseline measuring, assume leading / 4 as a
|
||||
// Until we don't have baseline measuring, assume 1 / 4 leading as a
|
||||
// rough guess:
|
||||
var bounds = new Rectangle(x,
|
||||
count ? leading / 4 + (count - 1) * leading : 0,
|
||||
width, -count * leading);
|
||||
count ? - 0.75 * leading : 0,
|
||||
width, count * leading);
|
||||
return matrix ? matrix._transformBounds(bounds, bounds) : bounds;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue