You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I cant seem to make the custom view mode to compile,
your code:
......
enumCustomViewMode{Day=TimelineViewMode.Day,//This also doesn't compile Week=TimelineViewMode.Week,Month=TimelineViewMode.Month,Custom='Custom'}classCustomStrategyManagerextendsStrategyManagerimplementsIStrategyManager<TimelineViewMode>{getScaleGenerator(viewMode: CustomViewMode): IScaleGenerator{if(viewMode===CustomViewMode.Custom){return{...};// your custom logic here}returnsuper.getScaleGenerator(viewMode);};getViewModeAdaptor(viewMode: CustomViewMode): IViewModeAdaptor{if(viewMode===CustomViewMode.Custom){return{...}// custom adaptor;}returnsuper.getAdaptor(viewMode);//This should be super.getViewModeAdaptor(viewMode); }}......
In the class signature you gave TimelineViewMode as a type for the modes, but in each method you except CustomViewMode, this can't compile.
Also when setting the zoom mode, it excepts a ITimelineZoom implementing that interface also doesn't compile when using it because of the enum:
Hi, I cant seem to make the custom view mode to compile,
In the class signature you gave
TimelineViewMode
as a type for the modes, but in each method you exceptCustomViewMode
, this can't compile.ITimelineZoom
implementing that interface also doesn't compile when using it because of the enum:but setting a mode with that type:
results in an error:
The text was updated successfully, but these errors were encountered: