remove unnecssary updateAreas

remove unnecessary updateZoneImage
This commit is contained in:
Isaac Connor 2016-06-07 21:23:30 -04:00
parent 593fe2b0c5
commit 4f2e0edb44
1 changed files with 7 additions and 12 deletions

View File

@ -323,7 +323,6 @@ function updateZoneImage()
Point.y = zone['Points'][i].y; Point.y = zone['Points'][i].y;
Poly.points.appendItem( Point ); Poly.points.appendItem( Point );
} }
updateArea();
} }
function fixActivePoint( index ) function fixActivePoint( index )
@ -357,8 +356,6 @@ function updateActivePoint( index )
var Point = $('zonePoly').points.getItem(index); var Point = $('zonePoly').points.getItem(index);
Point.x =x; Point.x =x;
Point.y =y; Point.y =y;
updateArea();
} }
function addPoint( index ) function addPoint( index )
@ -373,7 +370,8 @@ function addPoint( index )
else else
zone['Points'].splice( nextIndex, 0, { 'x': newX, 'y': newY } ); zone['Points'].splice( nextIndex, 0, { 'x': newX, 'y': newY } );
drawZonePoints(); drawZonePoints();
updateZoneImage(); // drawZonePoints calls updateZoneImage
//updateZoneImage();
//setActivePoint( nextIndex ); //setActivePoint( nextIndex );
} }
@ -381,7 +379,6 @@ function delPoint( index )
{ {
zone['Points'].splice( index, 1 ); zone['Points'].splice( index, 1 );
drawZonePoints(); drawZonePoints();
updateArea();
} }
function limitPointValue( point, loVal, hiVal ) function limitPointValue( point, loVal, hiVal )
@ -414,9 +411,8 @@ function updateX( index )
point.setStyle( 'left', x+'px' ); point.setStyle( 'left', x+'px' );
zone['Points'][index].x = x; zone['Points'][index].x = x;
var Point = $('zonePoly').points.getItem(index); var Point = $('zonePoly').points.getItem(index);
Point.x =x; Point.x = x;
Point.y =y; Point.y = y;
updateArea();
} }
function updateY( index ) function updateY( index )
@ -429,9 +425,8 @@ function updateY( index )
point.setStyle( 'top', y+'px' ); point.setStyle( 'top', y+'px' );
zone['Points'][index].y = y; zone['Points'][index].y = y;
var Point = $('zonePoly').points.getItem(index); var Point = $('zonePoly').points.getItem(index);
Point.x =x; Point.x = x;
Point.y =y; Point.y = y;
updateArea();
} }
function saveChanges( element ) function saveChanges( element )