Skip to content

Commit

Permalink
Merge pull request #11 from qlik-oss/QLIK-96528/ClickInStory
Browse files Browse the repository at this point in the history
Disable visual selections in snapshots and locked dims
  • Loading branch information
AlbertBackenhof authored Jun 27, 2019
2 parents 9866bfa + 9724f31 commit 57c2ba6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/bridgepicassospec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ThemeManager from './theme';
import { interactionsSetup } from './interactions.js';

export default function (element, layout, direction, isEditMode) {
export default function (element, layout, direction, isInteractable) {
let labels = {
startvalue: layout.labelsshow ? "Start Value" : layout.startName,
endvalue: layout.labelsshow ? "End Value" : layout.endName,
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function (element, layout, direction, isEditMode) {
}

return {
interactions: (isEditMode ? [] : interactionsSetup()),
interactions: (!isInteractable ? [] : interactionsSetup()),
scales: {
v: {
data: {
Expand Down Expand Up @@ -110,7 +110,7 @@ export default function (element, layout, direction, isEditMode) {
displayOrder: 0
},
brush: {
trigger: (isEditMode ? [] : [{
trigger: (!isInteractable ? [] : [{
on: 'tap',
contexts: ['highlight'],
globalPropagation: 'stop',
Expand Down Expand Up @@ -182,7 +182,7 @@ export default function (element, layout, direction, isEditMode) {
}
},
brush: {
trigger: (isEditMode ? [] : [{
trigger: (!isInteractable ? [] : [{
on: 'tap',
contexts: ['highlight'],
globalPropagation: 'stop',
Expand Down
5 changes: 4 additions & 1 deletion src/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export default ['$scope', '$element', function($scope, $element) {

if (isEditMode || typeof $scope.chart.settings === 'undefined') {
up.settings = bridgepicassospec(
$scope.chart.element, layout, $scope.$parent.options.direction, isEditMode);
$scope.chart.element,
layout,
$scope.$parent.options.direction,
!isEditMode && !$scope.backendApi.isSnapshot && !layout.qHyperCube.qDimensionInfo[0].qLocked);
}

$scope.chart.update(up);
Expand Down
1 change: 1 addition & 0 deletions src/converthypercube.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class ConvertHypercube {
qMax: dimInfo.qMax,
qMin: dimInfo.qMin,
qSortIndicator: dimInfo.qSortIndicator,
qLocked: dimInfo.qLocked,
qStateCounts: {
qAlternative: dimInfo.qStateCounts.qAlternative,
qDeselected: dimInfo.qStateCounts.qDeselected,
Expand Down

0 comments on commit 57c2ba6

Please sign in to comment.