Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
series = new Series({
chartType: 'bar',
tooltipPrefix: 'tooltip-prefix-',
theme: {
label: {
fontFamily: 'Verdana',
fontSize: 11,
fontWeight: 'normal'
},
colors: ['blue']
},
options: {},
eventBus: new snippet.CustomEvents()
});
});
beforeEach(() => {
series = new scatterSeriesFactory.ScatterChartSeries({
chartType: 'scatter',
theme: {
label: {
fontFamily: 'Verdana',
fontSize: 11
}
},
options: {},
eventBus: new snippet.CustomEvents()
});
series.layout = {
position: {
left: 0,
top: 0
}
};
});
beforeEach(() => {
eventBus = new snippet.CustomEvents();
tickBaseCoordinateModel = jasmine.createSpyObj('tickBaseCoordinateModel', ['makeRange']);
tickBaseCoordinateModel.data = [{}, {}, {}];
groupTypeEventDetector = new GroupTypeEventDetector({
chartType: 'chartType',
eventBus
});
groupTypeEventDetector.dimension = {width: 100, height: 100};
groupTypeEventDetector.layout = {
position: {top: 30, left: 40}
};
groupTypeEventDetector.tickBaseCoordinateModel = tickBaseCoordinateModel;
});
beforeEach(() => {
series = new barSeriesFactory.BulletChartSeries({
chartType: 'bullet',
theme: {},
options: {},
eventBus: new snippet.CustomEvents()
});
series.layout = {
dimension: {
width: 300,
height: 400
},
position: {
top: 50,
left: 100
}
};
seriesDataModel = new SeriesDataModel();
dataProcessor = jasmine.createSpyObj('dataProcessor', ['getSeriesDataModel']);
dataProcessor.getSeriesDataModel.and.returnValue(seriesDataModel);
series.dataProcessor = dataProcessor;
if (!this.checkExpectedCondition(clickEventData.target)) {
return;
}
getScheduleDataFunc = this._retriveScheduleData(this.alldayView, clickEventData);
scheduleData = getScheduleDataFunc(clickEventData);
this.fire('alldayCreationClick', scheduleData);
this._createSchedule(scheduleData);
this._requestOnClick = false;
};
common.mixin(alldayCore, AlldayCreation);
util.CustomEvents.mixin(AlldayCreation);
module.exports = AlldayCreation;
this._calendar
= this._timePicker
= this._datepickerInput
= this._container
= this._element
= this._date
= this._rangeModel
= this._openers
= this._isEnabled
= this._id
= null;
}
}
);
snippet.CustomEvents.mixin(DatePicker);
module.exports = DatePicker;
* @param {string} [className] - if supplied then return prefix added class name
* @returns {string} CSS prefix value
*/
View.prototype.cssprefix = function(className) {
return this.cssPrefix + (className || '');
};
/**
* set state
* @param {object} state - state
*/
View.prototype.setState = function(state) {
util.extend(this.state, state);
};
util.CustomEvents.mixin(View);
module.exports = View;
* @private
*/
_enable: function() {
this.$el.addClass(this._enableClass);
},
/**
* Disable droponze
* @private
*/
_disable: function() {
this.$el.removeClass(this._enableClass);
}
});
snippet.CustomEvents.mixin(DragAndDrop);
module.exports = DragAndDrop;
}
}
/**
* @event {MonthResize#monthResizeDragend}
* @type {object}
* @property {number} x - x index
* @property {number} y - y index
* @property {Date} date - drag date
*/
this.fire('monthResizeDragend', scheduleData);
this.getScheduleData = this._cache = null;
};
util.CustomEvents.mixin(MonthResize);
module.exports = MonthResize;
* @param {object} clickEventData - Drag#Click event handler data.
*/
AlldayMove.prototype._onClick = function(clickEventData) {
/**
* @event AlldayMove#alldayMoveClick
* @type {object}
* @property {AlldayView} relatedView - allday view instance.
* @property {number} datesInRange - date count of this view.
* @property {number} dragStartXIndex - index number of dragstart grid index.
* @property {number} xIndex - index number of mouse positions.
*/
this._onDragEnd(clickEventData, 'alldayMoveClick', true);
};
common.mixin(AlldayCore, AlldayMove);
util.CustomEvents.mixin(AlldayMove);
module.exports = AlldayMove;