mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-21 02:37:20 -05:00
chore: add hypercube generic functions - part02 (#1715)
* chore: add hypercube generic functions - part02
This commit is contained in:
committed by
GitHub
parent
6b84132273
commit
445d6949e7
@@ -0,0 +1,12 @@
|
||||
import { insertMainDimension } from './hypercube-utils';
|
||||
|
||||
export default function addMainDimension(self, dimension, index) {
|
||||
const dimensions = self.getDimensions();
|
||||
const idx = index ?? dimensions.length;
|
||||
|
||||
if (dimensions.length < self.maxDimensions()) {
|
||||
return insertMainDimension(self, dimension, dimensions, idx);
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
Reference in New Issue
Block a user