annotate src/implab/data/StatefullStoreAdapter.js @ 22:60f6493e2892

Added projection property to djol/VectorStore
author cin
date Wed, 06 Dec 2017 11:48:39 +0300
parents 93fb6c09f2e1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
93fb6c09f2e1 minor fixes
cin
parents: 0
diff changeset
1 define(["dojo/_base/declare", "dojo/_base/array", "../safe", "./StoreAdapter"], function(declare, array, safe ,AdapterStore){
0
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
2 return declare([AdapterStore], {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
3 _attrs : null,
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
4
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
5 constructor : function(opts) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
6 safe.argumentNotEmptyArray(opts.attrs, "opts.attrs");
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
7 this._attrs = opts.attrs;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
8 },
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
9
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
10 mapItem : function(item) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
11 var result = {};
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
12 array.forEach(this._attrs, function(p) {
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
13 result[p] = item.get(p);
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
14 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
15 return result;
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
16 }
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
17 });
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
18
fc2517695ee1 Initial commit, draft import of existing work
cin
parents:
diff changeset
19 });