Skip to content

Commit

Permalink
Merge pull request #169 from neurospeech/dev
Browse files Browse the repository at this point in the history
Fixed partial removal in virtual list
  • Loading branch information
ackava authored Jan 7, 2017
2 parents 86b0a36 + cb98c85 commit 3574c3e
Show file tree
Hide file tree
Showing 8 changed files with 931 additions and 916 deletions.
903 changes: 454 additions & 449 deletions atoms-debug.js

Large diffs are not rendered by default.

903 changes: 454 additions & 449 deletions atoms.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion atoms.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions atoms.min.js.map

Large diffs are not rendered by default.

Binary file modified nuget/Atoms.js/NuGet.log
Binary file not shown.
2 changes: 1 addition & 1 deletion nuget/Atoms.js/Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Web.Atoms.js</id>
<version>2.0.106</version>
<version>2.1.102</version>
<title>Web.Atoms.js</title>
<authors>Akash Kava</authors>
<owners></owners>
Expand Down
27 changes: 16 additions & 11 deletions src/Controls/AtomItemsControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,15 @@
}, 1);
},

resetVirtulContainer: function () {
this.disposeChildren(this._itemsPresenter);
this._firstChild = null;
this._lastChild = null;
this._scrollerSetup = false;
this._scopes = null;
this.unbindEvent(this._virtualContainer, "scroll");
},

onVirtualCollectionChanged: function () {


Expand All @@ -551,12 +560,7 @@

var items = this.get_dataItems();
if (!items.length) {
this.disposeChildren(ip);
this._firstChild = null;
this._lastChild = null;
this._scrollerSetup = false;
this._scopes = null;
this.unbindEvent(vc, "scroll");
this.resetVirtulContainer();
return;
}

Expand Down Expand Up @@ -715,7 +719,7 @@
var index2 = ae.currentIndex();
var data = ae.current();
var elementChild = cache[index2];
if (elementChild) {
if (elementChild && element.atomControl.get_data() == data) {
cache[index2] = null;
} else {
elementChild = this.createChildElement(parentScope, null, data, ae);
Expand Down Expand Up @@ -754,10 +758,6 @@
this._cachedItems = null;
}

if (this._uiVirtualize) {
this.onVirtualCollectionChanged();
return;
}

// just reset for now...
if (/remove/gi.test(mode)) {
Expand All @@ -775,6 +775,11 @@
return;
}

if (this._uiVirtualize) {
this.onVirtualCollectionChanged();
return;
}

var parentScope = this.get_scope();

var et = this.getTemplate("itemTemplate");
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Atom.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ window.AtomEnumerator = AtomEnumerator;
var Atom = {

version: {
text: "2.0.106",
text: "2.1.102",
major: 2,
minor: 0,
build: 106
minor: 1,
build: 102
},

refreshWindowCommand: function () {
Expand Down

0 comments on commit 3574c3e

Please sign in to comment.