Skip to content

Commit b0d73b1

Browse files
Add example in readme for how to sort images without ghost effect
1 parent 3940719 commit b0d73b1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,14 @@ The API is declarative. There are four directives (hooked on attributes) that ne
157157
</div>
158158
</div>
159159
```
160+
161+
###Example of sorting with images
162+
_Because images are draggable by default the browser will trigger the default behavior of showing an image's ghost on a drag event rather than the mousedown event listener relied on by this module, disabling that drag behavior leaves the element free to move immediately._
163+
164+
```html
165+
<div sv-root sv-part="photosArray">
166+
<div ng-repeat="photo in photosArray" sv-element>
167+
<img draggable="false" ng-src="{{photo.url}}" />
168+
</div>
169+
</div>
170+
```

0 commit comments

Comments
 (0)