Skip to content

Commit c693bdc

Browse files
Merge pull request #44 from qlik-oss/QB163
fix: disable interaction
2 parents 2947c25 + b8142a5 commit c693bdc

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/controller.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,29 @@ export default ['$scope', '$element', function ($scope, $element) {
10691069
? $element.find('.qlik-trellis-slide') : $element.find('.qlik-trellis-cell');
10701070
var tasks = [];
10711071
for (let i = 0; i < viz.length; i++) {
1072-
tasks.push(viz[i].show(trellisCells[i]));
1072+
let options;
1073+
location.search
1074+
.substr(1)
1075+
.split('&')
1076+
.forEach(val => {
1077+
const hash = val.split('=');
1078+
if (hash.length > 0) {
1079+
if (hash[0] === 'opt') {
1080+
let decodedVal = decodeURIComponent(hash[1]);
1081+
decodedVal = decodedVal.toLowerCase();
1082+
if (decodedVal.indexOf('nointeraction') > -1) {
1083+
options = options || {};
1084+
options.noInteraction = true;
1085+
}
1086+
1087+
if (decodedVal.indexOf('noselections') > -1) {
1088+
options = options || {};
1089+
options.noSelections = true;
1090+
}
1091+
}
1092+
}
1093+
});
1094+
tasks.push(viz[i].show(trellisCells[i], options));
10731095
}
10741096

10751097
if (trellisCells.length > viz.length) {

0 commit comments

Comments
 (0)