szurubooru/client/js/models/point_list.js

24 lines
460 B
JavaScript
Raw Normal View History

"use strict";
2016-07-22 13:27:52 +02:00
const AbstractList = require("./abstract_list.js");
const Point = require("./point.js");
2016-07-22 13:27:52 +02:00
class PointList extends AbstractList {
get firstPoint() {
return this._list[0];
}
get secondLastPoint() {
return this._list[this._list.length - 2];
}
get lastPoint() {
return this._list[this._list.length - 1];
}
}
PointList._itemClass = Point;
PointList._itemName = "point";
2016-07-22 13:27:52 +02:00
module.exports = PointList;