File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed
Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -477,7 +477,6 @@ class ContourDrawingDemo implements DemoInstance {
477477
478478 private continueDrawing ( point : Point2D ) : void {
479479 const lastPoint = this . points [ this . points . length - 1 ] ;
480- const startPoint = this . points [ 0 ] ;
481480 const dx = point . x - lastPoint . x ;
482481 const dy = point . y - lastPoint . y ;
483482 const dist = Math . hypot ( dx , dy ) ;
@@ -487,22 +486,10 @@ class ContourDrawingDemo implements DemoInstance {
487486 // Fill in all pixel-sized steps from last point to new point
488487 for ( let i = 1 ; i <= steps ; i ++ ) {
489488 const t = i / steps ;
490- const newPoint = {
489+ this . points . push ( {
491490 x : lastPoint . x + dx * t ,
492491 y : lastPoint . y + dy * t
493- } ;
494- this . points . push ( newPoint ) ;
495-
496- // Check if we've entered the start marker zone (only after we have enough points)
497- if ( this . points . length > 10 ) {
498- const distToStart = Math . hypot ( newPoint . x - startPoint . x , newPoint . y - startPoint . y ) ;
499- const threshold = this . pixelsToPlotUnits ( this . closeThresholdPixels ) ;
500- if ( distToStart <= threshold ) {
501- // Smoothly close to start point
502- this . closeContour ( ) ;
503- return ;
504- }
505- }
492+ } ) ;
506493 }
507494
508495 this . pointsDisplay . update ( String ( this . points . length ) ) ;
You can’t perform that action at this time.
0 commit comments