Skip to content

Commit f912ce9

Browse files
author
pipeline
committed
v27.2.4 is released
1 parent d2913c6 commit f912ce9

File tree

97 files changed

+1094
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+1094
-240
lines changed

controls/barcodegenerator/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.2.3 (2024-11-21)
5+
## 27.2.4 (2024-11-26)
66

77
### Barcode
88

controls/buttons/CHANGELOG.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
## [Unreleased]
44

5-
## 27.2.2 (2024-11-15)
5+
## 27.2.4 (2024-11-26)
66

77
### Checkbox
88

99
#### Bug Fixes
1010

1111
- `#F857466`- The issue with "Need to set the label tag for attribute if user changes the checkbox input id in checkbox component" has been resolved.
12+
13+
## 27.2.2 (2024-11-15)
14+
15+
### Checkbox
16+
17+
#### Bug Fixes
18+
1219
- `#F95768`- The issue with "Parent element click event `prevented` while clicking on switch component in angular." has been resolved.
1320

1421
## 27.1.58 (2024-11-05)

controls/calendars/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.2.3 (2024-11-21)
5+
## 27.2.4 (2024-11-26)
66

77
### DatePicker
88

controls/charts/CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
## [Unreleased]
44

5+
## 27.2.4 (2024-11-26)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#I654525` - Now, the error bar is displayed properly for the larger value.
12+
- `#I653358` - Now, the text render event’s text argument contains the datetime for the y-axis.
13+
- `#I654788` - Now, the chart zooms properly while scrolling after it is destroyed and re-rendered.
14+
- `#I653576` - The data label position is now set correctly for the labelIntersectAction as Hide.
15+
- `#I653442` - The selection rectangle now renders properly in canvas mode.
16+
- `#I654149` - Now the spline series animation is proper when adding null values.
17+
518
## 27.2.3 (2024-11-21)
619

720
### Chart

controls/charts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-charts",
3-
"version": "27.2.2",
3+
"version": "27.2.3",
44
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/charts/spec/chart/base/chart.spec.ts

+17
Original file line numberDiff line numberDiff line change
@@ -1557,5 +1557,22 @@ describe('Chart Control', () => {
15571557
chart.loaded = loaded;
15581558
chart.appendTo('#element');
15591559
});
1560+
it('Checking the mousewheel event', (done: Function) => {
1561+
loaded = (args: Object): void => {
1562+
let wheelArgs: unknown = {
1563+
preventDefault: () => {
1564+
},
1565+
wheelDelta: 120,
1566+
detail: 3,
1567+
clientX: 210,
1568+
clientY: 100
1569+
};
1570+
chart.zoomSettings.enableMouseWheelZooming = true;
1571+
chart.chartOnMouseWheel(<WheelEvent>wheelArgs);
1572+
done();
1573+
};
1574+
chart.loaded = loaded;
1575+
chart.appendTo('#element');
1576+
});
15601577
});
15611578
});

controls/charts/src/chart/chart.ts

+21-1
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,7 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
30083008
const stopEvent: string = Browser.touchEndEvent;
30093009
const cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
30103010
/** UnBind the Event handler */
3011-
3011+
EventHandler.remove(this.element, 'mousewheel', this.chartOnMouseWheel);
30123012
EventHandler.remove(this.element, startEvent, this.chartOnMouseDown);
30133013
EventHandler.remove(this.element, moveEvent, this.mouseMove);
30143014
EventHandler.remove(this.element, stopEvent, this.mouseEnd);
@@ -3048,6 +3048,7 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
30483048
const cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
30493049

30503050
/** Bind the Event handler */
3051+
EventHandler.add(this.element, 'mousewheel', this.chartOnMouseWheel, this);
30513052
EventHandler.add(this.element, Browser.touchStartEvent, this.chartOnMouseDown, this);
30523053
EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMove, this);
30533054
EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEnd, this);
@@ -3822,6 +3823,25 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
38223823
}
38233824
}
38243825

3826+
/**
3827+
* Handles the mouse wheel on the chart.
3828+
*
3829+
* @param {WheelEvent} e - The wheel event.
3830+
* @returns {boolean} - False.
3831+
* @private
3832+
*/
3833+
public chartOnMouseWheel(e: WheelEvent): boolean {
3834+
const offset: ClientRect = this.element.getBoundingClientRect();
3835+
const svgRect: ClientRect = getElement(this.svgId).getBoundingClientRect();
3836+
const mouseX: number = (e.clientX - offset.left) - Math.max(svgRect.left - offset.left, 0);
3837+
const mouseY: number = (e.clientY - offset.top) - Math.max(svgRect.top - offset.top, 0);
3838+
3839+
if (this.zoomSettings.enableMouseWheelZooming &&
3840+
withInBounds(mouseX, mouseY, this.chartAxisLayoutPanel.seriesClipRect)) {
3841+
this.notify('mousewheel', e);
3842+
}
3843+
return false;
3844+
}
38253845
/**
38263846
* Handles the mouse down on the chart.
38273847
*

controls/charts/src/chart/series/chart-series.ts

+29-1
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,33 @@ export class SeriesBase extends ChildProperty<SeriesBase> {
11851185
}
11861186
}
11871187
this.updateSplineValue();
1188+
this.updateYAxisForErrorBars();
1189+
}
1190+
/**
1191+
* Calculates the errorbar and adds a range to axis if errorbar exeeds to the actual range.
1192+
*
1193+
* @returns {void}
1194+
* @private
1195+
*/
1196+
private updateYAxisForErrorBars(): void {
1197+
if (this instanceof Series) {
1198+
if (this.chart.errorBarModule) {
1199+
let maxVerticalError: number;
1200+
if (this.errorBar.verticalError) {
1201+
for (let i: number = 0; i < this.points.length; i++) {
1202+
const verticalErrors: number[] = [];
1203+
for (let i: number = 0; i < this.points.length; i++) {
1204+
const point: Points = this.points[i as number];
1205+
if (point.verticalError) {
1206+
verticalErrors.push(point.verticalError);
1207+
}
1208+
}
1209+
maxVerticalError = Math.max(...verticalErrors);
1210+
}
1211+
}
1212+
this.yMax += isNaN(maxVerticalError) ? maxVerticalError / 2 : 0;
1213+
}
1214+
}
11881215
}
11891216

11901217
/**
@@ -2765,7 +2792,8 @@ export class Series extends SeriesBase {
27652792
if (this.chart.enableAnimation && (!(this.isRectSeries || this.type === 'Bubble' || this.type === 'Scatter')) && (this.type.indexOf('step') === -1)) {
27662793
if (this.marker && this.marker.visible && this.visible) {
27672794
for (let i: number = this.points.length - 2; i >= 0; i--) {
2768-
if (this.points[i as number] && this.points[i as number].symbolLocations[0] !== undefined) {
2795+
if (this.points[i as number] && !isNullOrUndefined(this.points[this.points.length - 2].y) &&
2796+
this.points[i as number].symbolLocations && this.points[i as number].symbolLocations[0] !== undefined) {
27692797
this.chart.markerRender.renderMarker(this, this.points[this.points.length - 2],
27702798
this.points[i as number].symbolLocations[0], null, true);
27712799
break;

controls/charts/src/chart/series/data-label.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ export class DataLabel {
467467
!((rect.y > (clipRect.y + clipRect.height)) || (rect.x > (clipRect.x + clipRect.width)) ||
468468
(rect.x + rect.width < 0) || (rect.y + rect.height < 0))) {
469469
rect.x = rect.x < 0 ? padding : rect.x;
470-
rect.y = (rect.y < 0) && !(dataLabel.labelIntersectAction === 'None') ? padding : rect.y;
470+
rect.y = (rect.y < 0 && !this.chart.requireInvertedAxis) && !(dataLabel.labelIntersectAction === 'None') ? padding : rect.y;
471471
rect.x -= (rect.x + rect.width) > (clipRect.x + clipRect.width) ? (rect.x + rect.width)
472472
- (clipRect.x + clipRect.width) + padding : 0;
473473
rect.y -= (rect.y + rect.height) > (clipRect.y + clipRect.height) ? (rect.y + rect.height)

controls/charts/src/chart/series/spline-series.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ export class SplineSeries extends SplineBase {
4848
startPoint = 'L';
4949
}
5050
this.storePointLocation(point, series, isInverted, getCoordinate);
51-
if (direction === '') {
51+
if (direction === '' && points.length === 1) {
5252
direction = 'M ' + point.symbolLocations[0].x + ' ' + point.symbolLocations[0].y;
5353
}
54+
if (firstPoint === null && direction !== '' && (point.index === points.length - 1 || (points[point.index + 1] && !points[point.index + 1].visible))) {
55+
direction += 'M ' + point.symbolLocations[0].x + ' ' + point.symbolLocations[0].y + ' ';
56+
}
5457
}
5558
firstPoint = point;
5659
} else {
@@ -142,10 +145,17 @@ export class SplineSeries extends SplineBase {
142145
const endPathCommands: string[] = (options.d).match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/g);
143146
const maxLength: number = Math.max(startPathCommands.length, endPathCommands.length);
144147
const minLength: number = Math.min(startPathCommands.length, endPathCommands.length);
148+
if (series.removedPointIndex === 0 && startPathCommands.length > endPathCommands.length && startPathCommands[2] && startPathCommands[2].indexOf('M') === 0) {
149+
startPathCommands.splice(0, startPathCommands.length - endPathCommands.length);
150+
points.previousDirection = startPathCommands.join('');
151+
}
145152
if (startPathCommands.length < endPathCommands.length) {
146153
for (let i: number = startPathCommands.length; i < endPathCommands.length; i++) {
147154
if (endPathCommands.length !== startPathCommands.length) {
148-
if (startPathCommands[startPathCommands.length - 1].indexOf('C') === 0) {
155+
if (endPathCommands.length === startPathCommands.length + 1 && endPathCommands[endPathCommands.length - 1].indexOf('M') === 0) {
156+
startPathCommands.push(endPathCommands[endPathCommands.length - 1]);
157+
}
158+
else if (startPathCommands[startPathCommands.length - 1].indexOf('C') === 0) {
149159
startPathCommands.push('L ' + ((startPathCommands[startPathCommands.length - 1]).split(' ').slice(-3)).join(' '));
150160
}
151161
else if (startPathCommands[startPathCommands.length - 1].indexOf('L') === 0) {

controls/charts/src/chart/user-interaction/zooming.ts

+13-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,17 @@ export class Zoom {
142142
if (chart.crosshairModule) {
143143
chart.crosshairModule.removeCrosshair(0);
144144
}
145-
const svg: Element = chart.enableCanvas ? document.getElementById(this.elementId + '_tooltip_svg') : chart.svgObject;
145+
let svg: Element = chart.svgObject;
146+
if (this.chart.enableCanvas) {
147+
const secondaryElement: HTMLElement = document.getElementById(this.chart.element.id + '_Secondary_Element');
148+
svg = this.chart.svgRenderer.createSvg({
149+
id: this.chart.element.id + '_zoomRect_svg',
150+
width: this.chart.availableSize.width,
151+
height: this.chart.availableSize.height
152+
});
153+
(svg as SVGElement).style.cssText = 'position: absolute; display:block; pointer-events: none';
154+
secondaryElement.appendChild(svg);
155+
}
146156
svg.appendChild(chart.svgRenderer.drawRectangle(new RectOption(
147157
this.elementId + '_ZoomArea', chart.themeStyle.selectionRectFill,
148158
{ color: chart.themeStyle.selectionRectStroke, width: 1 }, 1, rect, 0, 0, '', '3')
@@ -887,7 +897,7 @@ export class Zoom {
887897
*/
888898
private addEventListener(): void {
889899
if (this.chart.isDestroyed) { return; }
890-
EventHandler.add(this.chart.element, this.wheelEvent, this.chartMouseWheel, this);
900+
this.chart.on('mousewheel', this.chartMouseWheel, this);
891901
this.chart.on(Browser.touchMoveEvent, this.mouseMoveHandler, this);
892902
this.chart.on(Browser.touchStartEvent, this.mouseDownHandler, this);
893903
this.chart.on(Browser.touchEndEvent, this.mouseUpHandler, this);
@@ -901,7 +911,7 @@ export class Zoom {
901911
*/
902912
public removeEventListener(): void {
903913
if (this.chart.isDestroyed) { return; }
904-
EventHandler.remove(this.chart.element, this.wheelEvent, this.chartMouseWheel);
914+
this.chart.off('mousewheel', this.chartMouseWheel);
905915
this.chart.off(Browser.touchMoveEvent, this.mouseMoveHandler);
906916
this.chart.off(Browser.touchStartEvent, this.mouseDownHandler);
907917
this.chart.off(Browser.touchEndEvent, this.mouseUpHandler);

controls/diagrams/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.2.3 (2024-11-21)
5+
## 27.2.4 (2024-11-26)
66

77
### Diagram
88

controls/documenteditor/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-documenteditor",
3-
"version": "27.2.2",
3+
"version": "27.2.3",
44
"description": "Feature-rich document editor control with built-in support for context menu, options pane and dialogs.",
55
"keywords": [
66
"ej2",

controls/documenteditor/src/document-editor/implementation/editor/editor.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -8958,11 +8958,13 @@ export class Editor {
89588958
resolve();
89598959
return;
89608960
}
8961-
if (isNullOrUndefined(width) && isNullOrUndefined(height)) {
8961+
if (isNullOrUndefined(width) || isNullOrUndefined(height)) {
89628962
const image: HTMLImageElement = document.createElement('img');
89638963
let editor: Editor = this;
89648964
image.addEventListener('load', function (): void {
8965-
editor.insertPicture(imageString, this.width, this.height,this.alt,true);
8965+
this.width = isNullOrUndefined(width) ? this.width : width;
8966+
this.height = isNullOrUndefined(height) ? this.height : height;
8967+
editor.insertPicture(imageString, this.width, this.height, this.alt, true);
89668968
resolve();
89678969
});
89688970
image.src = imageString;

controls/documenteditor/src/document-editor/implementation/format/character-format.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ export class WCharacterFormat {
278278
if (!isNullOrUndefined((this.ownerBase as TextElementBox).paragraph) && !isNullOrUndefined((this.ownerBase as TextElementBox).paragraph.bodyWidget) && !isNullOrUndefined((this.ownerBase as TextElementBox).paragraph.bodyWidget.page)) {
279279
docCharacterFormat = (this.ownerBase as TextElementBox).paragraph.bodyWidget.page.documentHelper.characterFormat;
280280
} else {
281-
if (!isNullOrUndefined((this.ownerBase as ParagraphWidget).bodyWidget)) {
281+
if (!isNullOrUndefined((this.ownerBase as ParagraphWidget).bodyWidget) && !isNullOrUndefined((this.ownerBase as ParagraphWidget).bodyWidget.page)
282+
&& !isNullOrUndefined((this.ownerBase as ParagraphWidget).bodyWidget.page.documentHelper)) {
282283
docCharacterFormat = (this.ownerBase as ParagraphWidget).bodyWidget.page.documentHelper.characterFormat;
283284
}
284285
}

controls/documenteditor/src/document-editor/implementation/selection/selection.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -11373,7 +11373,10 @@ export class Selection {
1137311373
if(this.documentHelper.contentControlCollection[i].paragraph.isInHeaderFooter && this.documentHelper.owner.layoutType === "Continuous"){
1137411374
continue;
1137511375
}
11376-
this.highlightContentControlEditRegionInternal(this.documentHelper.contentControlCollection[i] as ContentControl);
11376+
if (this.documentHelper.contentControlCollection[i].line.paragraph.bodyWidget.page
11377+
&& this.documentHelper.contentControlCollection[i].line.paragraph.bodyWidget.page.documentHelper) {
11378+
this.highlightContentControlEditRegionInternal(this.documentHelper.contentControlCollection[i] as ContentControl);
11379+
}
1137711380
}
1137811381
}
1137911382
}

controls/documenteditor/src/document-editor/implementation/viewer/layout.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,8 @@ export class Layout {
21722172
(element instanceof ShapeBase && element.textWrappingStyle !== 'Inline')) {
21732173
if (!this.isInitialLoad && element instanceof ContentControl && element.type === 0 && element.contentControlWidgetType === 'Block') {
21742174
if (!isNullOrUndefined(element.paragraph) && (element.paragraph.firstChild as LineWidget).children[0] === element && !isNullOrUndefined(element.reference)
2175-
&& (element.reference.paragraph.lastChild as LineWidget).children[(element.reference.paragraph.lastChild as LineWidget).children.length - 1] !== element.reference) {
2175+
&& !isNullOrUndefined(element.reference.paragraph)
2176+
&& (element.reference.paragraph.lastChild as LineWidget).children[(element.reference.paragraph.lastChild as LineWidget).children.length - 1] !== element.reference) {
21762177
element.contentControlWidgetType = 'Inline';
21772178
element.reference.contentControlWidgetType = 'Inline';
21782179
let block: BlockWidget = element.paragraph;

controls/drawings/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.2.3 (2024-11-21)
5+
## 27.2.4 (2024-11-26)
66

77
### Drawings
88

controls/dropdowns/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 27.2.4 (2024-11-26)
6+
7+
### MultiSelect
8+
9+
#### Bug Fixes
10+
11+
- `#I655493` - Fixed the issue where the item was not displayed in the popup while filtering with virtualization.
12+
513
## 27.2.3 (2024-11-21)
614

715
### ListBox

controls/dropdowns/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-dropdowns",
3-
"version": "27.2.2",
3+
"version": "27.2.3",
44
"description": "Essential JS 2 DropDown Components",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/dropdowns/src/common/interface.ts

+1
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,6 @@ export interface IDropdownlist extends Component<HTMLElement> {
9797
fields?: FieldSettingsModel, query?: Query, e?: MouseEvent | KeyboardEventArgs | TouchEvent): void
9898
findListElement(list: HTMLElement, findNode: string, attribute: string, value: string | boolean | number): HTMLElement;
9999
scrollStop(e?: Event): void;
100+
targetElement(): string;
100101
}
101102

controls/dropdowns/src/common/virtual-scroll.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export class VirtualScroll {
162162
this.component = (component as any).component;
163163
}
164164
let endIndex: number = this.parent.viewPortInfo.endIndex;
165-
if (this.component === 'multiselect' && this.parent.mode === 'CheckBox' && this.parent.value && Array.isArray(this.parent.value) && this.parent.value.length > 0 && this.parent.enableSelectionOrder) {
165+
if (this.component === 'multiselect' && this.parent.mode === 'CheckBox' && this.parent.value && Array.isArray(this.parent.value) && this.parent.value.length > 0 && this.parent.enableSelectionOrder && this.parent.targetElement().trim() === '') {
166166
if (this.parent.viewPortInfo.startIndex < this.parent.value.length) {
167167
endIndex = this.parent.viewPortInfo.endIndex - this.parent.value.length;
168168
if (this.parent.viewPortInfo.startIndex === 0){
@@ -263,7 +263,8 @@ export class VirtualScroll {
263263
if (index === endIndex - 1) {
264264
if (currentData.length !== this.parent.itemCount) {
265265
if (this.parent.hideSelectedItem) {
266-
let query: Query = this.parent.getForQuery(this.parent.value as any).clone();
266+
let query: Query = this.parent.value && (this.parent.value as any).length > 0 ?
267+
this.parent.getForQuery(this.parent.value as any).clone() : new Query;
267268
if (
268269
this.parent.viewPortInfo.endIndex === this.parent.totalItemCount + (this.parent.value as any).length &&
269270
this.parent.hideSelectedItem

0 commit comments

Comments
 (0)