# Disables buggy client functions
* disables auto-buffering of new points and lines * improves rendering of surface size
This commit is contained in:
		
							parent
							
								
									ddbf6d570e
								
							
						
					
					
						commit
						728402b4e1
					
				@ -31,17 +31,17 @@ netgis.Toolbar.prototype.load = function()
 | 
			
		||||
		this.toolbars[ netgis.Modes.DRAW_POINTS ] = this.createToolbar();
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Punkte zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
 | 
			
		||||
		//this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) );
 | 
			
		||||
		//this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
 | 
			
		||||
		//this.append( this.toolbars[ netgis.Modes.DRAW_POINTS ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
 | 
			
		||||
		this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_POINTS ] );
 | 
			
		||||
 | 
			
		||||
		this.toolbars[ netgis.Modes.DRAW_LINES ] = this.createToolbar();
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarButton( '<i class="fas fa-times"></i><span>Linien zeichnen:</span>', this.onToolbarClose.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Einrasten", this.onSnapChange.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
 | 
			
		||||
		this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
 | 
			
		||||
		//this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarCheckbox( "Puffern", this.onDrawBufferChange.bind( this ) ) );
 | 
			
		||||
		//this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Radius (Meter):", bufferDefaultRadius, this.onDrawBufferRadiusChange.bind( this ) ) );
 | 
			
		||||
		//this.append( this.toolbars[ netgis.Modes.DRAW_LINES ], this.createToolbarInput( "Segmente:", bufferDefaultSegments, this.onDrawBufferSegmentsChange.bind( this ) ) );
 | 
			
		||||
		this.root.appendChild( this.toolbars[ netgis.Modes.DRAW_LINES ] );
 | 
			
		||||
		
 | 
			
		||||
		this.showDrawBufferOptions( false );
 | 
			
		||||
@ -266,12 +266,12 @@ netgis.Toolbar.prototype.onSetMode = function( e )
 | 
			
		||||
		case netgis.Modes.DRAW_LINES:
 | 
			
		||||
		{
 | 
			
		||||
			var checkbox = this.toolbars[ netgis.Modes.DRAW_POINTS ].getElementsByTagName( "input" )[ 1 ];
 | 
			
		||||
			
 | 
			
		||||
			/*
 | 
			
		||||
			if ( checkbox.checked )
 | 
			
		||||
			{
 | 
			
		||||
				this.client.invoke( netgis.Events.DRAW_BUFFER_ON, null );
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
			*/
 | 
			
		||||
			break;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
@ -533,16 +533,16 @@ netgis.Toolbar.prototype.showDrawBufferOptions = function( on )
 | 
			
		||||
	
 | 
			
		||||
	if ( on )
 | 
			
		||||
	{
 | 
			
		||||
		pointsItems[ 3 ].classList.remove( "netgis-hide" );
 | 
			
		||||
		pointsItems[ 4 ].classList.remove( "netgis-hide" );
 | 
			
		||||
		linesItems[ 3 ].classList.remove( "netgis-hide" );
 | 
			
		||||
		linesItems[ 4 ].classList.remove( "netgis-hide" );
 | 
			
		||||
		//pointsItems[ 3 ].classList.remove( "netgis-hide" );
 | 
			
		||||
		//pointsItems[ 4 ].classList.remove( "netgis-hide" );
 | 
			
		||||
		//linesItems[ 3 ].classList.remove( "netgis-hide" );
 | 
			
		||||
		//linesItems[ 4 ].classList.remove( "netgis-hide" );
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		pointsItems[ 3 ].classList.add( "netgis-hide" );
 | 
			
		||||
		pointsItems[ 4 ].classList.add( "netgis-hide" );
 | 
			
		||||
		linesItems[ 3 ].classList.add( "netgis-hide" );
 | 
			
		||||
		linesItems[ 4 ].classList.add( "netgis-hide" );
 | 
			
		||||
		//pointsItems[ 3 ].classList.add( "netgis-hide" );
 | 
			
		||||
		//pointsItems[ 4 ].classList.add( "netgis-hide" );
 | 
			
		||||
		//linesItems[ 3 ].classList.add( "netgis-hide" );
 | 
			
		||||
		//linesItems[ 4 ].classList.add( "netgis-hide" );
 | 
			
		||||
	}
 | 
			
		||||
};
 | 
			
		||||
@ -163,7 +163,7 @@ netgis.util =
 | 
			
		||||
			var output;
 | 
			
		||||
			
 | 
			
		||||
			// Normal / Large Value
 | 
			
		||||
			var large = ( area > 10000 );
 | 
			
		||||
			var large = ( area > 100000 );
 | 
			
		||||
			
 | 
			
		||||
			// Round Value
 | 
			
		||||
			var i = 0;
 | 
			
		||||
@ -186,10 +186,10 @@ netgis.util =
 | 
			
		||||
			if ( i === 0 ) large = false;
 | 
			
		||||
			
 | 
			
		||||
			// Build String
 | 
			
		||||
			output = i + ( large ? " qkm" : " qm" );
 | 
			
		||||
			i = i.toLocaleString("de-DE")
 | 
			
		||||
			output = i + ( large ? " km²" : " m²" );
 | 
			
		||||
			
 | 
			
		||||
			//NOTE: HTML Superscript / Unicode (² etc.) not supported in OL Labels
 | 
			
		||||
			
 | 
			
		||||
			return output;
 | 
			
		||||
		};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user