@sapui5/sap.gantt 1.108.11 → 1.108.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/gantt/.library +1 -1
- package/src/sap/gantt/AdhocLine.js +1 -1
- package/src/sap/gantt/GanttChart.js +1 -1
- package/src/sap/gantt/GanttChartBase.js +1 -1
- package/src/sap/gantt/GanttChartContainer.js +1 -1
- package/src/sap/gantt/GanttChartWithTable.js +1 -1
- package/src/sap/gantt/axistime/AxisTimeStrategyBase.js +1 -1
- package/src/sap/gantt/axistime/FullScreenStrategy.js +1 -1
- package/src/sap/gantt/axistime/ProportionZoomStrategy.js +1 -1
- package/src/sap/gantt/axistime/StepwiseZoomStrategy.js +1 -1
- package/src/sap/gantt/changeHandlers/simple/AdhocLine.js +1 -1
- package/src/sap/gantt/changeHandlers/simple/DeltaLine.js +1 -1
- package/src/sap/gantt/changeHandlers/simple/GanttChartContainer.js +1 -1
- package/src/sap/gantt/changeHandlers/simple/GanttChartWithTable.js +1 -1
- package/src/sap/gantt/config/BirdEyeGroup.js +1 -1
- package/src/sap/gantt/config/ChartScheme.js +1 -1
- package/src/sap/gantt/config/ColumnAttribute.js +1 -1
- package/src/sap/gantt/config/ContainerLayout.js +1 -1
- package/src/sap/gantt/config/ExpandChart.js +1 -1
- package/src/sap/gantt/config/ExpandChartGroup.js +1 -1
- package/src/sap/gantt/config/GanttChartLayout.js +1 -1
- package/src/sap/gantt/config/Hierarchy.js +1 -1
- package/src/sap/gantt/config/HierarchyColumn.js +1 -1
- package/src/sap/gantt/config/LayoutGroup.js +1 -1
- package/src/sap/gantt/config/Locale.js +1 -1
- package/src/sap/gantt/config/Mode.js +1 -1
- package/src/sap/gantt/config/ModeGroup.js +1 -1
- package/src/sap/gantt/config/ObjectType.js +1 -1
- package/src/sap/gantt/config/SettingGroup.js +1 -1
- package/src/sap/gantt/config/SettingItem.js +1 -1
- package/src/sap/gantt/config/Shape.js +1 -1
- package/src/sap/gantt/config/TimeAxis.js +1 -1
- package/src/sap/gantt/config/TimeHorizon.js +1 -1
- package/src/sap/gantt/config/TimeZoomGroup.js +1 -1
- package/src/sap/gantt/config/ToolbarGroup.js +1 -1
- package/src/sap/gantt/config/ToolbarScheme.js +1 -1
- package/src/sap/gantt/control/Cell.js +1 -1
- package/src/sap/gantt/def/DefBase.js +1 -1
- package/src/sap/gantt/def/SvgDefs.js +1 -1
- package/src/sap/gantt/def/cal/Calendar.js +1 -1
- package/src/sap/gantt/def/cal/CalendarDefs.js +1 -1
- package/src/sap/gantt/def/cal/TimeInterval.js +1 -1
- package/src/sap/gantt/def/filter/MorphologyFilter.js +1 -1
- package/src/sap/gantt/def/gradient/LinearGradient.js +1 -1
- package/src/sap/gantt/def/gradient/RadialGradient.js +1 -1
- package/src/sap/gantt/def/gradient/Stop.js +1 -1
- package/src/sap/gantt/def/pattern/BackSlashPattern.js +1 -1
- package/src/sap/gantt/def/pattern/PatternBase.js +1 -1
- package/src/sap/gantt/def/pattern/SlashPattern.js +1 -1
- package/src/sap/gantt/drawer/Drawer.js +1 -1
- package/src/sap/gantt/eventHandler/AutoScrollHandler.js +1 -1
- package/src/sap/gantt/eventHandler/BirdEyeHandler.js +1 -1
- package/src/sap/gantt/eventHandler/MouseWheelHandler.js +1 -1
- package/src/sap/gantt/eventHandler/ShapeHoverHandler.js +1 -1
- package/src/sap/gantt/eventHandler/ShapeResizeHandler.js +1 -1
- package/src/sap/gantt/eventHandler/TimePeriodZoomHandler.js +1 -1
- package/src/sap/gantt/eventHandler/TimePopoverHandler.js +1 -1
- package/src/sap/gantt/legend/DimensionLegend.js +1 -1
- package/src/sap/gantt/legend/LegendBase.js +1 -1
- package/src/sap/gantt/legend/LegendContainer.js +1 -1
- package/src/sap/gantt/legend/ListLegend.js +1 -1
- package/src/sap/gantt/library.js +2 -2
- package/src/sap/gantt/messagebundle_en_US_saptrc.properties +190 -190
- package/src/sap/gantt/misc/AxisOrdinal.js +1 -1
- package/src/sap/gantt/misc/Format.js +2 -2
- package/src/sap/gantt/misc/RelativeTimeFormatter.js +1 -1
- package/src/sap/gantt/misc/ShapeManager.js +1 -1
- package/src/sap/gantt/misc/Utility.js +11 -0
- package/src/sap/gantt/shape/Circle.js +1 -1
- package/src/sap/gantt/shape/ClipPath.js +1 -1
- package/src/sap/gantt/shape/Definitions.js +1 -1
- package/src/sap/gantt/shape/Group.js +1 -1
- package/src/sap/gantt/shape/Image.js +1 -1
- package/src/sap/gantt/shape/Line.js +1 -1
- package/src/sap/gantt/shape/Path.js +1 -1
- package/src/sap/gantt/shape/Polygon.js +1 -1
- package/src/sap/gantt/shape/Polyline.js +1 -1
- package/src/sap/gantt/shape/Rectangle.js +1 -1
- package/src/sap/gantt/shape/ResizeShadowShape.js +1 -1
- package/src/sap/gantt/shape/SelectedShape.js +1 -1
- package/src/sap/gantt/shape/Shape.js +1 -1
- package/src/sap/gantt/shape/Text.js +1 -1
- package/src/sap/gantt/shape/cal/Calendar.js +1 -1
- package/src/sap/gantt/shape/ext/Chevron.js +1 -1
- package/src/sap/gantt/shape/ext/Cursor.js +1 -1
- package/src/sap/gantt/shape/ext/Diamond.js +1 -1
- package/src/sap/gantt/shape/ext/Iconfont.js +1 -1
- package/src/sap/gantt/shape/ext/Pentangle.js +1 -1
- package/src/sap/gantt/shape/ext/TextRepeat.js +1 -1
- package/src/sap/gantt/shape/ext/Triangle.js +1 -1
- package/src/sap/gantt/shape/ext/rls/Relationship.js +1 -1
- package/src/sap/gantt/shape/ext/rls/SelectedRelationship.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcBorderPath.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcOverCapacityZonePolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcPolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcShortageCapacityPolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcTooltipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcUnderCapacityZonePolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UbcUsedPolygon.js +1 -1
- package/src/sap/gantt/shape/ext/ubc/UtilizationBarChart.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcBorderPath.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcClipPath.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcClipingPath.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcDimension.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcMiddleLine.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcOverCapacityZoneRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcOverClipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcTooltipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UlcUnderClipRectangle.js +1 -1
- package/src/sap/gantt/shape/ext/ulc/UtilizationLineChart.js +1 -1
- package/src/sap/gantt/simple/AdhocDiamond.js +1 -1
- package/src/sap/gantt/simple/AdhocLine.js +1 -1
- package/src/sap/gantt/simple/BaseCalendar.js +1 -1
- package/src/sap/gantt/simple/BaseChevron.js +1 -1
- package/src/sap/gantt/simple/BaseConditionalShape.js +1 -1
- package/src/sap/gantt/simple/BaseCursor.js +7 -7
- package/src/sap/gantt/simple/BaseDeltaRectangle.js +4 -4
- package/src/sap/gantt/simple/BaseDiamond.js +1 -1
- package/src/sap/gantt/simple/BaseGroup.js +1 -1
- package/src/sap/gantt/simple/BaseImage.js +1 -1
- package/src/sap/gantt/simple/BaseLine.js +1 -1
- package/src/sap/gantt/simple/BasePath.js +1 -1
- package/src/sap/gantt/simple/BaseRectangle.js +4 -4
- package/src/sap/gantt/simple/BaseShape.js +7 -5
- package/src/sap/gantt/simple/BaseText.js +1 -1
- package/src/sap/gantt/simple/BaseTriangle.js +1 -1
- package/src/sap/gantt/simple/ContainerToolbar.js +1 -1
- package/src/sap/gantt/simple/ContainerToolbarPlaceholder.js +1 -1
- package/src/sap/gantt/simple/CoordinateUtils.js +1 -1
- package/src/sap/gantt/simple/CustomVariantHandler.js +1 -1
- package/src/sap/gantt/simple/DeltaLine.js +1 -1
- package/src/sap/gantt/simple/ExpandModel.js +1 -1
- package/src/sap/gantt/simple/GanttAdaptationData.js +1 -1
- package/src/sap/gantt/simple/GanttChartContainer.js +1 -1
- package/src/sap/gantt/simple/GanttChartWithTable.js +11 -5
- package/src/sap/gantt/simple/GanttDragDropExtension.js +17 -5
- package/src/sap/gantt/simple/GanttExtension.js +1 -1
- package/src/sap/gantt/simple/GanttHeader.js +2 -2
- package/src/sap/gantt/simple/GanttPointerExtension.js +1 -1
- package/src/sap/gantt/simple/GanttPopoverExtension.js +2 -2
- package/src/sap/gantt/simple/GanttPrinting.js +1 -1
- package/src/sap/gantt/simple/GanttRowAction.js +1 -1
- package/src/sap/gantt/simple/GanttRowSettings.js +1 -1
- package/src/sap/gantt/simple/GanttUtils.js +11 -5
- package/src/sap/gantt/simple/GanttZoomExtension.js +4 -4
- package/src/sap/gantt/simple/InnerGanttChart.js +1 -1
- package/src/sap/gantt/simple/InnerGanttChartRenderer.js +2 -0
- package/src/sap/gantt/simple/LegendContainer.js +1 -1
- package/src/sap/gantt/simple/LegendShapeGroup.js +1 -1
- package/src/sap/gantt/simple/MultiActivityGroup.js +1 -1
- package/src/sap/gantt/simple/MultiActivityRowSettings.js +1 -1
- package/src/sap/gantt/simple/Relationship.js +1 -1
- package/src/sap/gantt/simple/RenderUtils.js +1 -1
- package/src/sap/gantt/simple/SelectionModel.js +17 -2
- package/src/sap/gantt/simple/ShapeScheme.js +1 -1
- package/src/sap/gantt/simple/StockChart.js +1 -1
- package/src/sap/gantt/simple/StockChartDimension.js +1 -1
- package/src/sap/gantt/simple/StockChartPeriod.js +1 -1
- package/src/sap/gantt/simple/UtilizationBarChart.js +1 -1
- package/src/sap/gantt/simple/UtilizationChart.js +1 -1
- package/src/sap/gantt/simple/UtilizationDimension.js +1 -1
- package/src/sap/gantt/simple/UtilizationLineChart.js +1 -1
- package/src/sap/gantt/simple/UtilizationPeriod.js +1 -1
- package/src/sap/gantt/simple/shapes/Shape.js +6 -5
- package/src/sap/gantt/simple/shapes/Task.js +1 -1
|
@@ -15,7 +15,8 @@ sap.ui.define([
|
|
|
15
15
|
"./GanttUtils",
|
|
16
16
|
"./CoordinateUtils",
|
|
17
17
|
"./AggregationUtils",
|
|
18
|
-
"../misc/Format"
|
|
18
|
+
"../misc/Format",
|
|
19
|
+
"sap/gantt/misc/Utility"
|
|
19
20
|
], function (
|
|
20
21
|
Log,
|
|
21
22
|
Device,
|
|
@@ -27,7 +28,8 @@ sap.ui.define([
|
|
|
27
28
|
GanttUtils,
|
|
28
29
|
CoordinateUtils,
|
|
29
30
|
AggregationUtils,
|
|
30
|
-
Format
|
|
31
|
+
Format,
|
|
32
|
+
Utility
|
|
31
33
|
) {
|
|
32
34
|
"use strict";
|
|
33
35
|
|
|
@@ -51,7 +53,7 @@ sap.ui.define([
|
|
|
51
53
|
* @extends sap.ui.core.Element
|
|
52
54
|
*
|
|
53
55
|
* @author SAP SE
|
|
54
|
-
* @version 1.108.
|
|
56
|
+
* @version 1.108.13
|
|
55
57
|
*
|
|
56
58
|
* @abstract
|
|
57
59
|
* @constructor
|
|
@@ -480,8 +482,8 @@ sap.ui.define([
|
|
|
480
482
|
BaseShape.prototype.getXByTime = function(vTime) {
|
|
481
483
|
var oAxisTime = this.getAxisTime();
|
|
482
484
|
|
|
483
|
-
var nTimeX = oAxisTime.timeToView(Format.abapTimestampToDate(vTime));
|
|
484
|
-
if (!
|
|
485
|
+
var nTimeX = oAxisTime && oAxisTime.timeToView(Format.abapTimestampToDate(vTime));
|
|
486
|
+
if (!Utility.isNumeric(nTimeX)) {
|
|
485
487
|
Log.warning("Cannot convert time:" + vTime + " to an valid coordinate. Invalid coordinate might not get rendered at all, check the property value!");
|
|
486
488
|
return 0;
|
|
487
489
|
}
|
|
@@ -17,7 +17,7 @@ sap.ui.define(['sap/ui/thirdparty/jquery', "sap/ui/Device"], function(jQuery, De
|
|
|
17
17
|
* @class Utility functionality to work with SVG coordination, e.g. find x position of cursor
|
|
18
18
|
*
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.108.
|
|
20
|
+
* @version 1.108.13
|
|
21
21
|
*
|
|
22
22
|
* @private
|
|
23
23
|
* @static
|
|
@@ -157,7 +157,7 @@ sap.ui.define([
|
|
|
157
157
|
* @extend sap.ui.core.Control
|
|
158
158
|
*
|
|
159
159
|
* @author SAP SE
|
|
160
|
-
* @version 1.108.
|
|
160
|
+
* @version 1.108.13
|
|
161
161
|
* @since 1.60
|
|
162
162
|
*
|
|
163
163
|
* @constructor
|
|
@@ -340,7 +340,7 @@ sap.ui.define([
|
|
|
340
340
|
ghostAlignment: {type: "string", defaultValue: library.dragdrop.GhostAlignment.None},
|
|
341
341
|
|
|
342
342
|
/**
|
|
343
|
-
* Flag to show or hide the start time and end time of a shape when you drag it along the time line. The property takes effect if only one shape is selected.
|
|
343
|
+
* Flag to show or hide the start time and end time of a shape when you drag it along the time line. The property takes effect if only one shape is selected or <code>enableMultipleGhosts</code> is set to false.
|
|
344
344
|
*/
|
|
345
345
|
showShapeTimeOnDrag: {type: "boolean", defaultValue: false},
|
|
346
346
|
|
|
@@ -495,7 +495,7 @@ sap.ui.define([
|
|
|
495
495
|
selectOnlyGraphicalShape: { type: "boolean", defaultValue: false },
|
|
496
496
|
|
|
497
497
|
/**
|
|
498
|
-
* Option to show or hide shape labels on ghost while dragging.
|
|
498
|
+
* Option to show or hide shape labels on ghost while dragging. The property takes effect only when <code>enableMultipleGhosts</code> is set to true.
|
|
499
499
|
* @since 1.94
|
|
500
500
|
*/
|
|
501
501
|
showTextOnGhost: {type: "boolean", defaultValue: true},
|
|
@@ -542,7 +542,13 @@ sap.ui.define([
|
|
|
542
542
|
* The highlighted rows are the ones where the shape drop is allowed
|
|
543
543
|
* @since 1.108
|
|
544
544
|
*/
|
|
545
|
-
rowHighlightAndHoverFill: {type : "sap.gantt.ValueSVGPaintServer"}
|
|
545
|
+
rowHighlightAndHoverFill: {type : "sap.gantt.ValueSVGPaintServer"},
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Flag to enable displaying multiple ghosts when multiple shapes are selected and dragged.
|
|
549
|
+
* @internal
|
|
550
|
+
*/
|
|
551
|
+
enableMultipleGhosts: {type: "boolean", defaultValue: true}
|
|
546
552
|
},
|
|
547
553
|
aggregations: {
|
|
548
554
|
/**
|
|
@@ -1360,7 +1366,7 @@ sap.ui.define([
|
|
|
1360
1366
|
};
|
|
1361
1367
|
|
|
1362
1368
|
GanttChartWithTable.prototype.setShapeSelectionMode = function(sSelectionMode) {
|
|
1363
|
-
this.setProperty("shapeSelectionMode", sSelectionMode);
|
|
1369
|
+
this.setProperty("shapeSelectionMode", sSelectionMode, true);
|
|
1364
1370
|
if (this.oSelection) {
|
|
1365
1371
|
this.oSelection.setSelectionMode(sSelectionMode);
|
|
1366
1372
|
}
|
|
@@ -96,7 +96,7 @@ sap.ui.define([
|
|
|
96
96
|
*
|
|
97
97
|
* @extends sap.gantt.simple.GanttExtension
|
|
98
98
|
* @author SAP SE
|
|
99
|
-
* @version 1.108.
|
|
99
|
+
* @version 1.108.13
|
|
100
100
|
* @constructor
|
|
101
101
|
* @private
|
|
102
102
|
* @alias sap.gantt.simple.GanttExtension
|
|
@@ -345,6 +345,10 @@ sap.ui.define([
|
|
|
345
345
|
endTime: oDraggedShape.getEndTime()
|
|
346
346
|
};
|
|
347
347
|
|
|
348
|
+
if (this.oSourceRow) {
|
|
349
|
+
this.oSourceRow.destroy();
|
|
350
|
+
}
|
|
351
|
+
|
|
348
352
|
//Set SourceRow = Row instance from where the shape is dragged
|
|
349
353
|
this.oSourceRow = this.getRowByShape(oDraggedShape);
|
|
350
354
|
|
|
@@ -360,11 +364,14 @@ sap.ui.define([
|
|
|
360
364
|
this._aVisibleDraggableShapes.push(oShape);
|
|
361
365
|
}
|
|
362
366
|
}.bind(this));
|
|
363
|
-
this.bMultipleGhosts = this._aVisibleDraggableShapes.length > 1;
|
|
367
|
+
this.bMultipleGhosts = this.getGantt().getEnableMultipleGhosts() && this._aVisibleDraggableShapes.length > 1;
|
|
364
368
|
this.mGhostLabelStyle = {};
|
|
365
|
-
this._bEnableRowHighlight = oDraggedShape.getDragHighlightRows().length > 0 &&
|
|
369
|
+
this._bEnableRowHighlight = oDraggedShape.getDragHighlightRows().length > 0 && (this._aVisibleDraggableShapes.length == 1);
|
|
366
370
|
|
|
367
371
|
DragDropHelper.addDragDropEventListeners(this.getGantt());
|
|
372
|
+
} else if (this.oSourceRow) {
|
|
373
|
+
this.oSourceRow.destroy();
|
|
374
|
+
this.oSourceRow = undefined;
|
|
368
375
|
}
|
|
369
376
|
};
|
|
370
377
|
|
|
@@ -1427,12 +1434,17 @@ sap.ui.define([
|
|
|
1427
1434
|
var sTextDom = bTargetShape ? "" : "<div id='sapGanttDragText' class='sapGanttDragTextOverlay " + oStyle.css + "'>" + "</div>";
|
|
1428
1435
|
var oShape = Core.byId(oLastNode.id);
|
|
1429
1436
|
var bLabelFlag = !oShape && oLastNode.parentNode && Core.byId(oLastNode.parentNode.id) instanceof sap.gantt.simple.BaseGroup;
|
|
1437
|
+
var bEnableMultipleGhosts = this.getGantt().getEnableMultipleGhosts();
|
|
1430
1438
|
if (bLabelFlag){
|
|
1431
1439
|
oShape = Core.byId(oLastNode.parentNode.id);
|
|
1432
1440
|
}
|
|
1433
|
-
if (bTargetShape && this.getGantt().getShowTextOnGhost()) {
|
|
1441
|
+
if (bEnableMultipleGhosts && bTargetShape && this.getGantt().getShowTextOnGhost()) {
|
|
1434
1442
|
sTextDom = this._getGhostLabel(oShape, oLastNode);
|
|
1435
1443
|
}
|
|
1444
|
+
if (!bEnableMultipleGhosts) {
|
|
1445
|
+
var sNumberOfObjects = this.getNumberOfDragObject(oLastNode);
|
|
1446
|
+
sTextDom = "<div id='sapGanttDragText' class='sapGanttDragTextOverlay " + oStyle.css + "'>" + sNumberOfObjects + "</div>";
|
|
1447
|
+
}
|
|
1436
1448
|
|
|
1437
1449
|
if (this.bMultipleGhosts){
|
|
1438
1450
|
this._aShapeNodes.push(bLabelFlag ? oLastNode.parentNode : oLastNode);
|
|
@@ -1445,7 +1457,7 @@ sap.ui.define([
|
|
|
1445
1457
|
"<img class='sapGanttDragGhostImg' src='" + cropedImg + "'>" + sTextDom +
|
|
1446
1458
|
"</div>";
|
|
1447
1459
|
oGhostWrapperDom.insertAdjacentHTML('beforeend', sDragGhostDom);
|
|
1448
|
-
if (bTargetShape && this.getGantt().getShowTextOnGhost() && sTextDom !== "") {
|
|
1460
|
+
if (bEnableMultipleGhosts && bTargetShape && this.getGantt().getShowTextOnGhost() && sTextDom !== "") {
|
|
1449
1461
|
this._updateGhostLabelStyle();
|
|
1450
1462
|
}
|
|
1451
1463
|
};
|
|
@@ -33,7 +33,7 @@ sap.ui.define([
|
|
|
33
33
|
* @extend sap.ui.core.Element
|
|
34
34
|
*
|
|
35
35
|
* @author SAP SE
|
|
36
|
-
* @version 1.108.
|
|
36
|
+
* @version 1.108.13
|
|
37
37
|
*
|
|
38
38
|
* @constructor
|
|
39
39
|
* @private
|
|
@@ -322,7 +322,7 @@ sap.ui.define([
|
|
|
322
322
|
( oGantt.getEnableDeltaLine() === true && aDeltaLines.length > 0)) {
|
|
323
323
|
oRm.openStart("svg", "inner-header-svg").openEnd();
|
|
324
324
|
oRm.openStart("g", "inner-header-g");
|
|
325
|
-
oRm.style("height", iMarkerAreaHeight);
|
|
325
|
+
oRm.style("height", iMarkerAreaHeight + "px");
|
|
326
326
|
oRm.openEnd();
|
|
327
327
|
var oRectArea = new BaseRectangle({
|
|
328
328
|
x: 0,
|
|
@@ -79,7 +79,7 @@ function(
|
|
|
79
79
|
*
|
|
80
80
|
* @extends sap.gantt.simple.GanttExtension
|
|
81
81
|
* @author SAP SE
|
|
82
|
-
* @version 1.108.
|
|
82
|
+
* @version 1.108.13
|
|
83
83
|
* @constructor
|
|
84
84
|
* @private
|
|
85
85
|
* @alias sap.gantt.simple.GanttPopoverExtension
|
|
@@ -154,7 +154,7 @@ function(
|
|
|
154
154
|
GanttPopoverExtension.prototype.onMouseDown = function(oEvent) {
|
|
155
155
|
var oSelection = this.getGantt().getSelection();
|
|
156
156
|
var iSelectedDraggableShapes = oSelection.numberOfSelectedDraggableShapes();
|
|
157
|
-
this.bMultipleShapes = iSelectedDraggableShapes > 1;
|
|
157
|
+
this.bMultipleShapes = this.getGantt().getEnableMultipleGhosts() && iSelectedDraggableShapes > 1;
|
|
158
158
|
this.pageWidth = window.innerWidth;
|
|
159
159
|
this.pageHeight = window.innerHeight;
|
|
160
160
|
PopoverHelper.addPopoverEventListeners(this.getGantt());
|
|
@@ -70,7 +70,7 @@ sap.ui.define([
|
|
|
70
70
|
nTimeX = oShape.getXByTime(vTime);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
if (!
|
|
73
|
+
if (!Utility.isNumeric(nTimeX)) {
|
|
74
74
|
Log.warning("couldn't convert timestamp to x with value: " + vTime);
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -187,10 +187,16 @@ sap.ui.define([
|
|
|
187
187
|
sShapeId = oPart.shapeId;
|
|
188
188
|
|
|
189
189
|
var selector = ["[id='", sContainerId, "']", " [" + GanttUtils.SHAPE_ID_DATASET_KEY + "='", sShapeId, "']"].join("");
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
var sElm = document.querySelector(selector);
|
|
191
|
+
if (sElm) {
|
|
192
|
+
var oElement = Core.byId(sElm.id);
|
|
193
|
+
if (oElement) {
|
|
194
|
+
var oElmPart = Utility.parseUid(oElement.getShapeUid());
|
|
195
|
+
if (oElmPart.shapeId === sShapeId && oElmPart.rowId === oPart.rowId) {
|
|
196
|
+
return oElement;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
194
200
|
};
|
|
195
201
|
return aShapeUid.map(fnElementFromShapeId);
|
|
196
202
|
},
|
|
@@ -77,7 +77,7 @@ sap.ui.define([
|
|
|
77
77
|
oGanttDom = mDom.gantt,
|
|
78
78
|
oHeaderSvg = mDom.headerSvg;
|
|
79
79
|
var fnBindEventToDom = function(sEventName, oDom) {
|
|
80
|
-
jQuery(oDom).
|
|
80
|
+
jQuery(oDom).on(sEventName, GanttZoomHelper.dispatch.bind(oGantt));
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
// before binding events, first clear all to prevent duplicate event registered
|
|
@@ -159,9 +159,9 @@ sap.ui.define([
|
|
|
159
159
|
oGanttSvg = mDom.ganttSvg,
|
|
160
160
|
oGanttDom = mDom.gantt,
|
|
161
161
|
oHeaderSvg = mDom.headerSvg;
|
|
162
|
-
jQuery(oGanttSvg).
|
|
163
|
-
jQuery(oHeaderSvg).
|
|
164
|
-
jQuery(oGanttDom).
|
|
162
|
+
jQuery(oGanttSvg).off(sNameSpace);
|
|
163
|
+
jQuery(oHeaderSvg).off(sNameSpace);
|
|
164
|
+
jQuery(oGanttDom).off(sNameSpace);
|
|
165
165
|
jQuery(document).off(sNameSpace);
|
|
166
166
|
|
|
167
167
|
}
|
|
@@ -618,6 +618,8 @@ sap.ui.define([
|
|
|
618
618
|
oFakeRlsInstance.bindObject({path: sBindingPath, model: oRelationshipsBindingInfo.model});
|
|
619
619
|
if (GanttUtils.relationexist(oGantt,oFakeRlsInstance)){
|
|
620
620
|
GanttUtils.setLmarker(oGantt,oFakeRlsInstance,false);
|
|
621
|
+
} else {
|
|
622
|
+
oFakeRlsInstance.destroy();
|
|
621
623
|
}
|
|
622
624
|
}
|
|
623
625
|
};
|
|
@@ -790,7 +790,7 @@
|
|
|
790
790
|
oShape.mAxisTime = mOption.axisTime;
|
|
791
791
|
oShape.setProperty("shapeUid", sShapeUid, true);
|
|
792
792
|
if (oShape.getProperty("selectable")) {
|
|
793
|
-
oShape.setProperty("selected", mOption.selectionModel.
|
|
793
|
+
oShape.setProperty("selected", mOption.selectionModel.isShapeSelected(sShapeUid), true);
|
|
794
794
|
}
|
|
795
795
|
if (oShape.getProperty("highlightable")) {
|
|
796
796
|
oShape.setProperty("highlighted", mOption.highlightModel.existed(sShapeUid), true);
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
sap.ui.define([
|
|
10
10
|
"sap/gantt/library",
|
|
11
11
|
"sap/ui/base/EventProvider",
|
|
12
|
-
"./GanttUtils"
|
|
13
|
-
|
|
12
|
+
"./GanttUtils",
|
|
13
|
+
"sap/gantt/misc/Utility"
|
|
14
|
+
], function (library, EventProvider, GanttUtils, Utility) {
|
|
14
15
|
"use strict";
|
|
15
16
|
|
|
16
17
|
var SelectionMode = library.SelectionMode;
|
|
@@ -164,6 +165,20 @@ sap.ui.define([
|
|
|
164
165
|
}
|
|
165
166
|
};
|
|
166
167
|
|
|
168
|
+
SelectionModel.prototype.isShapeSelected = function (sUid) {
|
|
169
|
+
var oPart = Utility.parseUid(sUid),
|
|
170
|
+
sShapeID = oPart.shapeId,
|
|
171
|
+
sRowID = oPart.rowId;
|
|
172
|
+
var bSelected = false;
|
|
173
|
+
Object.keys(this.mSelected.uid).forEach(function (sShapeUid) {
|
|
174
|
+
var oShapePart = Utility.parseUid(sShapeUid);
|
|
175
|
+
if (sShapeID === oShapePart.shapeId && sRowID === oShapePart.rowId) {
|
|
176
|
+
bSelected = true;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
return bSelected;
|
|
180
|
+
};
|
|
181
|
+
|
|
167
182
|
SelectionModel.prototype.existed = function (sUid) {
|
|
168
183
|
return !!this.mSelected.uid[sUid];
|
|
169
184
|
};
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/gantt/simple/BaseShape",
|
|
9
|
-
"sap/ui/thirdparty/jquery",
|
|
10
9
|
"sap/gantt/misc/Format",
|
|
11
|
-
"sap/ui/core/theming/Parameters"
|
|
12
|
-
|
|
10
|
+
"sap/ui/core/theming/Parameters",
|
|
11
|
+
"sap/ui/core/RenderManager",
|
|
12
|
+
"sap/gantt/misc/Utility"
|
|
13
|
+
], function (BaseShape, Format, Parameters, RenderManager, Utility) {
|
|
13
14
|
"use strict";
|
|
14
15
|
|
|
15
16
|
var DEFAULT_ROW_PADDING = 12;
|
|
@@ -29,7 +30,7 @@ sap.ui.define([
|
|
|
29
30
|
* @extends sap.gantt.simple.BaseShape
|
|
30
31
|
*
|
|
31
32
|
* @author SAP SE
|
|
32
|
-
* @version 1.108.
|
|
33
|
+
* @version 1.108.13
|
|
33
34
|
*
|
|
34
35
|
* @abstract
|
|
35
36
|
* @constructor
|
|
@@ -216,7 +217,7 @@ sap.ui.define([
|
|
|
216
217
|
var startTime = oAxisTime.timeToView(Format.abapTimestampToDate(this.getTime())),
|
|
217
218
|
endTime = oAxisTime.timeToView(Format.abapTimestampToDate(this.getEndTime()));
|
|
218
219
|
|
|
219
|
-
if (
|
|
220
|
+
if (Utility.isNumeric(startTime) && Utility.isNumeric(endTime)) {
|
|
220
221
|
return Math.abs(endTime - startTime);
|
|
221
222
|
} else {
|
|
222
223
|
return 0;
|