lib/packages/core-classes.js
function(new_indices) {

		var i = 0,
			result = this._createHelperStorage(),
			index,
			verification = {};

		if (Lava.schema.DEBUG && new_indices.length != this._count) throw "reorder: new item count is less than current";

		for (; i < this._count; i++) {

			index = new_indices[i];
			result.push(this._data_uids[index], this._data_values[index], this._data_names[index]);

			if (Lava.schema.DEBUG) {
				// duplicate UIDs may break a lot of functionality, in this class and outside
				if (index in verification) Lava.t("Malformed index array");
				verification[index] = null;
			}

		}

		this._assignStorage(result);
		this._fire('collection_changed');

	}
function(new_indices) {

		var i = 0,
			result = this._createHelperStorage(),
			index,
			verification = {};

		if (Lava.schema.DEBUG && new_indices.length != this._count) throw "reorder: new item count is less than current";

		for (; i < this._count; i++) {

			index = new_indices[i];
			result.push(this._data_uids[index], this._data_values[index], this._data_names[index]);

			if (Lava.schema.DEBUG) {
				// duplicate UIDs may break a lot of functionality, in this class and outside
				if (index in verification) Lava.t("Malformed index array");
				verification[index] = null;
			}

		}

		this._assignStorage(result);
		this._fire('collection_changed');

	}
function ( new_indices ) { var i = 0 , result = this . _createHelperStorage ( ) , index , verification = { } ; if ( Lava . schema . DEBUG && new_indices . length != this . _count ) throw "reorder: new item count is less than current" ; for ( ; i < this . _count ; i ++ ) { index = new_indices [ i ] ; result . push ( this . _data_uids [ index ] , this . _data_values [ index ] , this . _data_names [ index ] ) ; if ( Lava . schema . DEBUG ) { // duplicate UIDs may break a lot of functionality, in this class and outside if ( index in verification ) Lava . t ( "Malformed index array" ) ; verification [ index ] = null ; } } this . _assignStorage ( result ) ; this . _fire ( 'collection_changed' ) ; }
Sort items by premade array of new item indices
@param {Array.<number>} new_indices
Sort items by premade array of new item indices