Spot the link / entityClass error!

This commit is contained in:
Professor Bunbury 2020-10-23 17:45:27 -04:00
parent 5f5a145626
commit d392b568db
56 changed files with 6353 additions and 3288 deletions

View file

@ -4,7 +4,7 @@ import { SW5E } from "../config.js";
* A helper class for building MeasuredTemplates for 5e powers and abilities
* @extends {MeasuredTemplate}
*/
export class AbilityTemplate extends MeasuredTemplate {
export default class AbilityTemplate extends MeasuredTemplate {
/**
* A factory method to create an AbilityTemplate instance using provided data from an Item5e instance
@ -37,8 +37,8 @@ export class AbilityTemplate extends MeasuredTemplate {
templateData.width = target.value;
templateData.direction = 45;
break;
case "ray": // 5e rays are most commonly 5ft wide
templateData.width = 5;
case "ray": // 5e rays are most commonly 1 square (5 ft) in width
templateData.width = target.width ?? canvas.dimensions.distance;
break;
default:
break;
@ -52,9 +52,8 @@ export class AbilityTemplate extends MeasuredTemplate {
/**
* Creates a preview of the power template
* @param {Event} event The initiating click event
*/
drawPreview(event) {
drawPreview() {
const initialLayer = canvas.activeLayer;
this.draw();
this.layer.activate();