@xpadev-net/niconicomments 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +7 -7
  2. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- niconicomments.js v0.2.6
2
+ niconicomments.js v0.2.7
3
3
  (c) 2021 xpadev-net https://xpadev.net
4
4
  Released under the MIT License.
5
5
  */
@@ -350,19 +350,19 @@
350
350
  if (comment.size === "big" && lines.length > 2) {
351
351
  comment.fontSize = this.fontSize.big.resized;
352
352
  comment.resized = true;
353
- comment.tateRisized = true;
353
+ comment.tateResized = true;
354
354
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
355
355
  }
356
356
  else if (comment.size === "medium" && lines.length > 4) {
357
357
  comment.fontSize = this.fontSize.medium.resized;
358
358
  comment.resized = true;
359
- comment.tateRisized = true;
359
+ comment.tateResized = true;
360
360
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
361
361
  }
362
362
  else if (comment.size === "small" && lines.length > 6) {
363
363
  comment.fontSize = this.fontSize.small.resized;
364
364
  comment.resized = true;
365
- comment.tateRisized = true;
365
+ comment.tateResized = true;
366
366
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
367
367
  }
368
368
  }
@@ -374,7 +374,7 @@
374
374
  width_max = Math.max.apply(Math, width_arr);
375
375
  width_min = Math.min.apply(Math, width_arr);
376
376
  height = (comment.fontSize * (1 + this.commentYPaddingTop) * lines.length) + (this.commentYMarginBottom * comment.fontSize);
377
- if (comment.loc !== "naka" && !comment.tateRisized) {
377
+ if (comment.loc !== "naka" && !comment.tateResized) {
378
378
  if (comment.full && width_max > 1920) {
379
379
  comment.fontSize -= 2;
380
380
  comment.resized = true;
@@ -390,14 +390,14 @@
390
390
  return this.measureText(comment);
391
391
  }
392
392
  }
393
- else if (comment.loc !== "naka" && comment.tateRisized && (comment.full && width_max > 1920 || !comment.full && width_max > 1440) && !comment.yokoResized) {
393
+ else if (comment.loc !== "naka" && comment.tateResized && (comment.full && width_max > 1920 || !comment.full && width_max > 1440) && !comment.yokoResized) {
394
394
  comment.fontSize = this.fontSize[comment.size]["default"];
395
395
  comment.resized = true;
396
396
  comment.yokoResized = true;
397
397
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
398
398
  return this.measureText(comment);
399
399
  }
400
- else if (comment.loc !== "naka" && comment.tateRisized && comment.yokoResized) {
400
+ else if (comment.loc !== "naka" && comment.tateResized && comment.yokoResized) {
401
401
  if (comment.full && width_max > this.doubleResizeMaxWidth.full[this.useLegacy ? "legacy" : "default"]) {
402
402
  comment.fontSize -= 1;
403
403
  this.context.font = parseFont(comment.font, comment.fontSize, this.useLegacy);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpadev-net/niconicomments",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "NiconiComments is a comment drawing library that is somewhat compatible with the official Nico Nico Douga player.",
5
5
  "main": "dist/bundle.js",
6
6
  "scripts": {