fixing {roll20} and adventure masks

This commit is contained in:
Kyle
2021-07-27 10:33:32 -07:00
parent fdbed639b0
commit 4ef92ab966
4 changed files with 28 additions and 11 deletions

View File

@@ -758,6 +758,7 @@ function writeText(textObject, targetContext) {
var textFontStyle = textObject.fontStyle || '';
var manaPlacementCounter = 0;
var realTextAlign = textAlign;
savedRollYPosition = null;
//variables that track various... things?
var newLineSpacing = 0;
var textSize = startingTextSize;
@@ -1012,8 +1013,8 @@ function writeText(textObject, targetContext) {
paragraphContext.drawImage(lineCanvas, horizontalAdjust, currentY);
lineY = 0;
lineContext.clearRect(0, 0, lineCanvas.width, lineCanvas.height);
//boxes for roll a d20 cards
if (savedRollYPosition && (newLineSpacing != 0 || !(newLine && !textOneLine))) {
// boxes for 'roll a d20' cards
if (savedRollYPosition != null && (newLineSpacing != 0 || !(newLine && !textOneLine))) {
if (savedRollYPosition != -1) {
paragraphContext.globalCompositeOperation = 'destination-over';
paragraphContext.globalAlpha = 0.25;