Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/konva/lib/shapes/Star.js

    rd565449 r0c6b92a  
    88class Star extends Shape_1.Shape {
    99    _sceneFunc(context) {
    10         var innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();
     10        const innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();
    1111        context.beginPath();
    1212        context.moveTo(0, 0 - outerRadius);
    13         for (var n = 1; n < numPoints * 2; n++) {
    14             var radius = n % 2 === 0 ? outerRadius : innerRadius;
    15             var x = radius * Math.sin((n * Math.PI) / numPoints);
    16             var y = -1 * radius * Math.cos((n * Math.PI) / numPoints);
     13        for (let n = 1; n < numPoints * 2; n++) {
     14            const radius = n % 2 === 0 ? outerRadius : innerRadius;
     15            const x = radius * Math.sin((n * Math.PI) / numPoints);
     16            const y = -1 * radius * Math.cos((n * Math.PI) / numPoints);
    1717            context.lineTo(x, y);
    1818        }
Note: See TracChangeset for help on using the changeset viewer.