Commit 1ade9064 authored by David Anderson's avatar David Anderson
Browse files

commiting before changing projects

parent 8085b97b
......@@ -78,7 +78,7 @@ export class ZoomPanDemoComponent implements AfterViewInit, OnDestroy {
let zoom = new ZoomBehavior();
zoom.limitZoom( axis, 0.5, 1.5 );
let pan = new PanBehavior( 'wheel' ); // use wheel because we want to click on the data
let pan = new PanBehavior();
pan.limitPan( bottomAxis, pointCount * -0.25, pointCount * 1.25 );
me.chart.addBehavior(
......
import { DataPoint } from '../../classes/datapoint.class';
import { DebugLogger } from '../../classes/debugLogger.class';
import { BaseAxisImplementation } from '../../implementations/axis/baseAxisImplementation.class';
import { clamp } from '../../utility/clamp.method';
import { makeList } from '../../utility/makeList.method';
import { uID } from '../../utility/uID.method';
import { BaseChart } from '../charts/baseChart.class';
......@@ -223,7 +224,8 @@ export abstract class BaseAxis<T = any> {
if ( zoom !== this._implementation.currentZoomLevel ) {
multiplier = zoom / this._implementation.currentZoomLevel;
}
this._implementation.currentZoomLevel = Math.max( Math.min( zoom, this._implementation.scaleExtent[ 1 ] ), this._implementation.scaleExtent[ 0 ] );
this._implementation.currentZoomLevel = clamp( zoom, this._implementation.scaleExtent[ 0 ], this._implementation.scaleExtent[ 1 ] );
this._implementation.offset *= multiplier;
this._implementation.offset += offset;
Object.keys( this._implementation.charts ).forEach( key => {
......
......@@ -545,15 +545,15 @@ export abstract class BaseAxisImplementation<T> {
}
let preferredAligns = {
top: 'center',
bottom: 'center',
left: 'right',
right: 'left'
top: 'center' as any,
bottom: 'center' as any,
left: 'right' as any,
right: 'left' as any
};
let baseLines = {
top: 'bottom',
bottom: 'top',
left: 'middle',
right: 'middle'
top: 'bottom' as any,
bottom: 'top' as any,
left: 'middle' as any,
right: 'middle' as any
};
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -81,7 +81,7 @@ export declare abstract class BaseAxisImplementation<T> {
max: number;
diff: number;
};
readonly textAlign: string;
readonly textAlign: any;
/**
* Buffer this axis is drawn to. This should be never be added to the dom
*
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment