From 37a82fbeb7aa59260fe5f31b62228914ee4a44a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Wed, 21 May 2014 12:27:16 +0300 Subject: Added an example about QML axis dragging Task-number: QTRD-3128 To be documented Change-Id: I044a890c8ef4814274b97be68cf7582c07a77247 Reviewed-by: Miikka Heikkinen --- .../qmlaxisdrag/qml/qmlaxisdrag/main.qml | 266 +++++++++++++++++++++ 1 file changed, 266 insertions(+) create mode 100644 examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml (limited to 'examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml') diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml new file mode 100644 index 00000000..64472a57 --- /dev/null +++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml @@ -0,0 +1,266 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtDataVisualization module. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ + +import QtQuick 2.1 +import QtDataVisualization 1.1 +import "." + +Item { + id: mainView + width: 800 + height: 600 + visible: true + + property int selectedAxisLabel: -1 + property real dragSpeedModifier: 100.0 + + ListModel { + id: graphModel + ListElement{ xPos: 0.0; yPos: 0.0; zPos: 0.0; rotation: "@0,0,0,0" } + ListElement{ xPos: 1.0; yPos: 1.0; zPos: 1.0; rotation: "@45,1,1,1" } + } + + Timer { + id: dataTimer + interval: 1 + running: true + repeat: true + property bool isIncreasing: true + property real rotationAngle: 0 + + function generateQuaternion() { + return "@" + Math.random() * 360 + "," + Math.random() + "," + + Math.random() + "," + Math.random() + } + + function appendRow() { + graphModel.append({"xPos": Math.random(), + "yPos": Math.random(), + "zPos": Math.random(), + "rotation": generateQuaternion() + }); + } + + onTriggered: { + rotationAngle = rotationAngle + 1 + scatterSeries.setMeshAxisAndAngle(Qt.vector3d(1,1,1), rotationAngle) + qtCube.setRotationAxisAndAngle(Qt.vector3d(1,0,1), rotationAngle) + if (isIncreasing) { + for (var i = 0; i < 10; i++) + appendRow() + if (graphModel.count > 2002) { + scatterGraph.theme = isabelleTheme + isIncreasing = false + } + } else { + graphModel.remove(2, 10); + if (graphModel.count == 2) { + scatterGraph.theme = dynamicColorTheme + isIncreasing = true + } + } + } + } + + ThemeColor { + id: dynamicColor + ColorAnimation on color { + from: "red" + to: "yellow" + duration: 2000 + loops: Animation.Infinite + } + } + + Theme3D { + id: dynamicColorTheme + type: Theme3D.ThemeEbony + baseColors: [dynamicColor] + font.pointSize: 50 + labelBorderEnabled: true + labelBackgroundColor: "gold" + labelTextColor: "black" + } + + Theme3D { + id: isabelleTheme + type: Theme3D.ThemeIsabelle + font.pointSize: 50 + labelBorderEnabled: true + labelBackgroundColor: "gold" + labelTextColor: "black" + } + + Item { + id: dataView + anchors.bottom: parent.bottom + width: parent.width + height: parent.height + + Scatter3D { + id: scatterGraph + width: dataView.width + height: dataView.height + theme: dynamicColorTheme + shadowQuality: AbstractGraph3D.ShadowQualityNone + scene.activeCamera.yRotation: 45.0 + scene.activeCamera.xRotation: 45.0 + scene.activeCamera.zoomLevel: 75.0 + inputHandler: null + + Scatter3DSeries { + id: scatterSeries + itemLabelFormat: "X:@xLabel Y:@yLabel Z:@zLabel" + mesh: Abstract3DSeries.MeshCube + + ItemModelScatterDataProxy { + itemModel: graphModel + xPosRole: "xPos" + yPosRole: "yPos" + zPosRole: "zPos" + rotationRole: "rotation" + } + } + customItemList: [ + Custom3DItem { + id: qtCube + meshFile: ":/mesh/cube" + textureFile: ":/texture/texture" + position: Qt.vector3d(0.5,0.5,0.5) + scaling: Qt.vector3d(0.3,0.3,0.3) + } + ] + onSelectedElementChanged: { + if (selectedElement >= AbstractGraph3D.ElementAxisXLabel + && selectedElement <= AbstractGraph3D.ElementAxisYLabel) + selectedAxisLabel = selectedElement + else + selectedAxisLabel = -1 + } + } + + MouseArea { + id: inputArea + anchors.fill: parent + hoverEnabled: true + acceptedButtons: Qt.LeftButton + property int mouseX: -1 + property int mouseY: -1 + property int previousMouseX: -1 + property int previousMouseY: -1 + + onPositionChanged: { + mouseX = mouse.x; + mouseY = mouse.y; + if (pressed && selectedAxisLabel != -1) + dragAxis(mouseX, mouseY, previousMouseX, previousMouseY); + previousMouseX = mouseX; + previousMouseY = mouseY; + } + + onPressed: { + scatterGraph.scene.selectionQueryPosition = Qt.point(inputArea.mouseX, + inputArea.mouseY); + } + } + } + + function dragAxis(mouseX, mouseY, previousMouseX, previousMouseY) { + // Directional drag multipliers based on rotation + // In this example camera is locked to 45 degrees, so we can use precalculated values + var xMulX = 0.70710678146 + var xMulY = 0.7071067809 + var zMulX = 0.7071067809 + var zMulY = 0.70710678146 + + // Get the drag amount + var moveX = mouseX - previousMouseX + var moveY = mouseY - previousMouseY + + // Adjust axes + switch (selectedAxisLabel) { + case AbstractGraph3D.ElementAxisXLabel: + var distance = (moveX * xMulX - moveY * xMulY) / dragSpeedModifier + scatterGraph.axisX.min -= distance + scatterGraph.axisX.max -= distance + break + case AbstractGraph3D.ElementAxisZLabel: + distance = (moveX * zMulX + moveY * zMulY) / dragSpeedModifier + scatterGraph.axisZ.min += distance + scatterGraph.axisZ.max += distance + break + case AbstractGraph3D.ElementAxisYLabel: + distance = moveY / dragSpeedModifier + scatterGraph.axisY.min += distance + scatterGraph.axisY.max += distance + break + } + } + + NewButton { + id: rangeToggle + width: parent.width / 3 // We're adding 3 buttons and want to divide them equally + text: "Use Preset Range" + anchors.left: parent.left + property bool autoRange: true + onClicked: { + if (autoRange) { + text = "Use Automatic Range" + scatterGraph.axisX.min = 0.3 + scatterGraph.axisX.max = 0.7 + scatterGraph.axisY.min = 0.3 + scatterGraph.axisY.max = 0.7 + scatterGraph.axisZ.min = 0.3 + scatterGraph.axisZ.max = 0.7 + autoRange = false + dragSpeedModifier = 200.0 + } else { + text = "Use Preset Range" + autoRange = true + dragSpeedModifier = 100.0 + } + scatterGraph.axisX.autoAdjustRange = autoRange + scatterGraph.axisY.autoAdjustRange = autoRange + scatterGraph.axisZ.autoAdjustRange = autoRange + } + } + + NewButton { + id: orthoToggle + width: parent.width / 3 + text: "Display Orthographic" + anchors.left: rangeToggle.right + onClicked: { + if (scatterGraph.orthoProjection) { + text = "Display Orthographic"; + scatterGraph.orthoProjection = false + } else { + text = "Display Perspective"; + scatterGraph.orthoProjection = true + } + } + } + + NewButton { + id: exitButton + width: parent.width / 3 + text: "Quit" + anchors.left: orthoToggle.right + onClicked: Qt.quit(0); + } +} -- cgit v1.2.3 From 4e37f474d69c64cb1f7d605467e47538464ba332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 22 May 2014 08:38:49 +0300 Subject: Docs for qml axis drag example Task-number: QTRD-3128 Change-Id: I731074040d51dc7dcd7aa2774c5889d5ae588191 Reviewed-by: Miikka Heikkinen --- .../qmlaxisdrag/qml/qmlaxisdrag/main.qml | 39 ++++++++++++++++------ 1 file changed, 29 insertions(+), 10 deletions(-) (limited to 'examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml') diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml index 64472a57..06f59bf1 100644 --- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml +++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml @@ -56,10 +56,12 @@ Item { }); } + //! [10] onTriggered: { rotationAngle = rotationAngle + 1 - scatterSeries.setMeshAxisAndAngle(Qt.vector3d(1,1,1), rotationAngle) qtCube.setRotationAxisAndAngle(Qt.vector3d(1,0,1), rotationAngle) + //! [10] + scatterSeries.setMeshAxisAndAngle(Qt.vector3d(1,1,1), rotationAngle) if (isIncreasing) { for (var i = 0; i < 10; i++) appendRow() @@ -112,8 +114,11 @@ Item { width: parent.width height: parent.height + //! [0] Scatter3D { id: scatterGraph + inputHandler: null + //! [0] width: dataView.width height: dataView.height theme: dynamicColorTheme @@ -121,7 +126,6 @@ Item { scene.activeCamera.yRotation: 45.0 scene.activeCamera.xRotation: 45.0 scene.activeCamera.zoomLevel: 75.0 - inputHandler: null Scatter3DSeries { id: scatterSeries @@ -136,6 +140,7 @@ Item { rotationRole: "rotation" } } + //! [9] customItemList: [ Custom3DItem { id: qtCube @@ -145,6 +150,8 @@ Item { scaling: Qt.vector3d(0.3,0.3,0.3) } ] + //! [9] + //! [5] onSelectedElementChanged: { if (selectedElement >= AbstractGraph3D.ElementAxisXLabel && selectedElement <= AbstractGraph3D.ElementAxisYLabel) @@ -152,41 +159,50 @@ Item { else selectedAxisLabel = -1 } + //! [5] } + //! [1] MouseArea { id: inputArea anchors.fill: parent - hoverEnabled: true acceptedButtons: Qt.LeftButton + //! [1] property int mouseX: -1 property int mouseY: -1 property int previousMouseX: -1 property int previousMouseY: -1 + //! [3] onPositionChanged: { mouseX = mouse.x; mouseY = mouse.y; + //! [3] + //! [6] if (pressed && selectedAxisLabel != -1) dragAxis(mouseX, mouseY, previousMouseX, previousMouseY); + //! [6] + //! [4] previousMouseX = mouseX; previousMouseY = mouseY; } + //! [4] + //! [2] onPressed: { scatterGraph.scene.selectionQueryPosition = Qt.point(inputArea.mouseX, inputArea.mouseY); } + //! [2] } } + //! [7] function dragAxis(mouseX, mouseY, previousMouseX, previousMouseY) { // Directional drag multipliers based on rotation - // In this example camera is locked to 45 degrees, so we can use precalculated values - var xMulX = 0.70710678146 - var xMulY = 0.7071067809 - var zMulX = 0.7071067809 - var zMulY = 0.70710678146 + // Camera is locked to 45 degrees, so we can use one precalculated value instead of + // calculating xx, xy, zx and zy individually + var cameraMultiplier = 0.70710678 // Get the drag amount var moveX = mouseX - previousMouseX @@ -195,12 +211,12 @@ Item { // Adjust axes switch (selectedAxisLabel) { case AbstractGraph3D.ElementAxisXLabel: - var distance = (moveX * xMulX - moveY * xMulY) / dragSpeedModifier + var distance = ((moveX - moveY) * cameraMultiplier) / dragSpeedModifier scatterGraph.axisX.min -= distance scatterGraph.axisX.max -= distance break case AbstractGraph3D.ElementAxisZLabel: - distance = (moveX * zMulX + moveY * zMulY) / dragSpeedModifier + distance = ((moveX + moveY) * cameraMultiplier) / dragSpeedModifier scatterGraph.axisZ.min += distance scatterGraph.axisZ.max += distance break @@ -211,6 +227,7 @@ Item { break } } + //! [7] NewButton { id: rangeToggle @@ -240,6 +257,7 @@ Item { } } + //! [8] NewButton { id: orthoToggle width: parent.width / 3 @@ -255,6 +273,7 @@ Item { } } } + //! [8] NewButton { id: exitButton -- cgit v1.2.3 From a5d500d4cba7b346c9ba1aedd6f5aaf651da4ce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 22 May 2014 09:41:15 +0300 Subject: QML axis label regression bug fix Task-number: QTRD-3131 Change-Id: I89d150228848f6b151f474fb6bf64f1f64dbfdc1 Change-Id: I89d150228848f6b151f474fb6bf64f1f64dbfdc1 Reviewed-by: Miikka Heikkinen --- examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml') diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml index 06f59bf1..8daf4983 100644 --- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml +++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml @@ -166,6 +166,7 @@ Item { MouseArea { id: inputArea anchors.fill: parent + hoverEnabled: true acceptedButtons: Qt.LeftButton //! [1] property int mouseX: -1 -- cgit v1.2.3 From 71185c7f11d3cb19a7a4b678861457af7a7f8af1 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 22 May 2014 11:17:25 +0300 Subject: Fix misc minor issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename bars background mesh more logically - Reorder ElementAxis enums logically - Change the sun in rotations example to a custom item Task-number: QTRD-3132 Change-Id: I00dacb68ebce222edc1a732cf7d14f1660934b36 Reviewed-by: Tomi Korpipää --- .../datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml') diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml index 8daf4983..e161cf41 100644 --- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml +++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml @@ -154,7 +154,7 @@ Item { //! [5] onSelectedElementChanged: { if (selectedElement >= AbstractGraph3D.ElementAxisXLabel - && selectedElement <= AbstractGraph3D.ElementAxisYLabel) + && selectedElement <= AbstractGraph3D.ElementAxisZLabel) selectedAxisLabel = selectedElement else selectedAxisLabel = -1 @@ -216,16 +216,16 @@ Item { scatterGraph.axisX.min -= distance scatterGraph.axisX.max -= distance break - case AbstractGraph3D.ElementAxisZLabel: - distance = ((moveX + moveY) * cameraMultiplier) / dragSpeedModifier - scatterGraph.axisZ.min += distance - scatterGraph.axisZ.max += distance - break case AbstractGraph3D.ElementAxisYLabel: distance = moveY / dragSpeedModifier scatterGraph.axisY.min += distance scatterGraph.axisY.max += distance break + case AbstractGraph3D.ElementAxisZLabel: + distance = ((moveX + moveY) * cameraMultiplier) / dragSpeedModifier + scatterGraph.axisZ.min += distance + scatterGraph.axisZ.max += distance + break } } //! [7] -- cgit v1.2.3 From 4a56455f7a5b64473da6f6cb724c366fe9942c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 22 May 2014 12:49:02 +0300 Subject: Android and iOS config fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + example tweak Change-Id: I408cd43a7af3efceccd42bd2439803e41c5272d6 Change-Id: I408cd43a7af3efceccd42bd2439803e41c5272d6 Reviewed-by: Tomi Korpipää --- examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml') diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml index e161cf41..08d6e088 100644 --- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml +++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml @@ -122,7 +122,7 @@ Item { width: dataView.width height: dataView.height theme: dynamicColorTheme - shadowQuality: AbstractGraph3D.ShadowQualityNone + shadowQuality: AbstractGraph3D.ShadowQualityLow scene.activeCamera.yRotation: 45.0 scene.activeCamera.xRotation: 45.0 scene.activeCamera.zoomLevel: 75.0 @@ -146,7 +146,7 @@ Item { id: qtCube meshFile: ":/mesh/cube" textureFile: ":/texture/texture" - position: Qt.vector3d(0.5,0.5,0.5) + position: Qt.vector3d(0.65,0.35,0.65) scaling: Qt.vector3d(0.3,0.3,0.3) } ] @@ -268,6 +268,7 @@ Item { if (scatterGraph.orthoProjection) { text = "Display Orthographic"; scatterGraph.orthoProjection = false + scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityLow } else { text = "Display Perspective"; scatterGraph.orthoProjection = true -- cgit v1.2.3 From f0ccb395f2688ed619ed769d23cfdc4b191ad609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Fri, 23 May 2014 07:17:02 +0300 Subject: Fixed axis dragging example for touch devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTRD-3139 Change-Id: If81d707618d5426d6463de17334d8a391054143d Reviewed-by: Tomi Korpipää --- .../qmlaxisdrag/qml/qmlaxisdrag/main.qml | 80 +++++++++++++++------- 1 file changed, 55 insertions(+), 25 deletions(-) (limited to 'examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml') diff --git a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml index 08d6e088..91685297 100644 --- a/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml +++ b/examples/datavisualization/qmlaxisdrag/qml/qmlaxisdrag/main.qml @@ -28,6 +28,10 @@ Item { property int selectedAxisLabel: -1 property real dragSpeedModifier: 100.0 + property int currentMouseX: -1 + property int currentMouseY: -1 + property int previousMouseX: -1 + property int previousMouseY: -1 ListModel { id: graphModel @@ -164,67 +168,92 @@ Item { //! [1] MouseArea { - id: inputArea anchors.fill: parent hoverEnabled: true acceptedButtons: Qt.LeftButton //! [1] - property int mouseX: -1 - property int mouseY: -1 - property int previousMouseX: -1 - property int previousMouseY: -1 //! [3] onPositionChanged: { - mouseX = mouse.x; - mouseY = mouse.y; + currentMouseX = mouse.x; + currentMouseY = mouse.y; //! [3] //! [6] if (pressed && selectedAxisLabel != -1) - dragAxis(mouseX, mouseY, previousMouseX, previousMouseY); + dragAxis(); //! [6] //! [4] - previousMouseX = mouseX; - previousMouseY = mouseY; + previousMouseX = currentMouseX; + previousMouseY = currentMouseY; } //! [4] //! [2] onPressed: { - scatterGraph.scene.selectionQueryPosition = Qt.point(inputArea.mouseX, - inputArea.mouseY); + scatterGraph.scene.selectionQueryPosition = Qt.point(mouse.x, mouse.y); } //! [2] + + onReleased: { + // We need to clear mouse positions and selected axis, because touch devices cannot + // track position all the time + selectedAxisLabel = -1 + currentMouseX = -1 + currentMouseY = -1 + previousMouseX = -1 + previousMouseY = -1 + } } } //! [7] - function dragAxis(mouseX, mouseY, previousMouseX, previousMouseY) { - // Directional drag multipliers based on rotation - // Camera is locked to 45 degrees, so we can use one precalculated value instead of - // calculating xx, xy, zx and zy individually + function dragAxis() { + // Do nothing if previous mouse position is uninitialized + if (previousMouseX === -1) + return + + // Directional drag multipliers based on rotation. Camera is locked to 45 degrees, so we + // can use one precalculated value instead of calculating xx, xy, zx and zy individually var cameraMultiplier = 0.70710678 - // Get the drag amount - var moveX = mouseX - previousMouseX - var moveY = mouseY - previousMouseY + // Calculate the mouse move amount + var moveX = currentMouseX - previousMouseX + var moveY = currentMouseY - previousMouseY // Adjust axes switch (selectedAxisLabel) { case AbstractGraph3D.ElementAxisXLabel: var distance = ((moveX - moveY) * cameraMultiplier) / dragSpeedModifier - scatterGraph.axisX.min -= distance - scatterGraph.axisX.max -= distance + // Check if we need to change min or max first to avoid invalid ranges + if (distance > 0) { + scatterGraph.axisX.min -= distance + scatterGraph.axisX.max -= distance + } else { + scatterGraph.axisX.max -= distance + scatterGraph.axisX.min -= distance + } break case AbstractGraph3D.ElementAxisYLabel: distance = moveY / dragSpeedModifier - scatterGraph.axisY.min += distance - scatterGraph.axisY.max += distance + // Check if we need to change min or max first to avoid invalid ranges + if (distance > 0) { + scatterGraph.axisY.max += distance + scatterGraph.axisY.min += distance + } else { + scatterGraph.axisY.min += distance + scatterGraph.axisY.max += distance + } break case AbstractGraph3D.ElementAxisZLabel: distance = ((moveX + moveY) * cameraMultiplier) / dragSpeedModifier - scatterGraph.axisZ.min += distance - scatterGraph.axisZ.max += distance + // Check if we need to change min or max first to avoid invalid ranges + if (distance > 0) { + scatterGraph.axisZ.max += distance + scatterGraph.axisZ.min += distance + } else { + scatterGraph.axisZ.min += distance + scatterGraph.axisZ.max += distance + } break } } @@ -268,6 +297,7 @@ Item { if (scatterGraph.orthoProjection) { text = "Display Orthographic"; scatterGraph.orthoProjection = false + // Orthographic projection disables shadows, so we need to switch them back on scatterGraph.shadowQuality = AbstractGraph3D.ShadowQualityLow } else { text = "Display Perspective"; -- cgit v1.2.3