mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-25 17:42:46 +02:00
build fix for news
This commit is contained in:
@@ -231,6 +231,7 @@ The following is the list of API functions that can be used to draw... whatever
|
||||
|
||||
- `this.width` the width of the graphic
|
||||
- `this.height` the height of the graphic
|
||||
- `this.frame` the current frame (i.e. the number of times `draw()` has run)
|
||||
- `this.panelWidth` the width of a single panel in the graphic, only meaningful in conjunction with `setPanelWidth` (see below)
|
||||
- `this.parameters` the collection of externally passed parameters (via HTML: `data-...` attributes, via JS: a key/value object)
|
||||
- `this.cursor` represents the current mouse/touch cursor state
|
||||
|
@@ -77,6 +77,7 @@ class BaseAPI {
|
||||
this.addListeners();
|
||||
this.setSize(width, height);
|
||||
this.currentPoint = false;
|
||||
this.frame = 0;
|
||||
this.setup();
|
||||
this.draw();
|
||||
}
|
||||
@@ -175,7 +176,6 @@ class BaseAPI {
|
||||
this.stopEvent(evt);
|
||||
this.cursor.down = false;
|
||||
this.cursor.move = false;
|
||||
this.getCursorCoords(evt);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,6 +244,7 @@ class BaseAPI {
|
||||
* This is the draw (loop) function.
|
||||
*/
|
||||
draw() {
|
||||
this.frame++;
|
||||
// console.log(`draw`);
|
||||
}
|
||||
|
||||
|
@@ -107,11 +107,15 @@ class GraphicsAPI extends BaseAPI {
|
||||
for (let i = 0, e = this.movable.length, p; i < e; i++) {
|
||||
p = this.movable[i];
|
||||
if (new Vector(p).dist(this.cursor) <= 5) {
|
||||
this.setCursor(this.HAND);
|
||||
if (this.canvas.style.cursor !== `none`) {
|
||||
this.setCursor(this.HAND);
|
||||
}
|
||||
return; // NOTE: this is a return, not a break!
|
||||
}
|
||||
}
|
||||
this.setCursor(this.POINTER);
|
||||
if (this.canvas.style.cursor !== `none`) {
|
||||
this.setCursor(this.POINTER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user