-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
98 lines (85 loc) · 3.28 KB
/
index.html
File metadata and controls
98 lines (85 loc) · 3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<html ng-app="app">
<head>
<title>Angular Select and Drag Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script>
<script type="text/javascript" src="bower_components/angular-multiple-selection/multiple-selection.min.js"></script>
<script type="text/javascript" src="multiple-drag.js"></script>
<script type="text/javascript">
angular.module('app', ['multipleDrag']);
</script>
<style type="text/css">
.row {
width: 100%;
overflow: hidden;
/* disable selection */
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.item_container {
position: absolute;
border: 1px solid #ccc;
padding: 10px;
height: 500px;
overflow: hidden;
}
.item_container div {
width: 33%
}
.select-helper {
position: absolute;
border: 1px dashed red;
background: red;
opacity: 0.2;
}
.selected {
background-color: green !important;
}
.selecting {
background-color: yellow !important;
}
.dragging {
background-color: red !important;
}
.item1{
top:10px;
}
.item2{
top:80px;
left:400px;
}
.item3{
top:150px;
left:800px;
}
.item4{
top:220px;
left:400px;
}
.item5{
top:290px;
}
</style>
</head>
<body>
<div class="container-fluid">
<h1>Angular Select and Drag Demo</h1>
<i>Simple way to make your element movable</i><br> For single selection you can use mouse click. For multiple selection you can use Ctrl + Mouse click or Mouse dragging.
When you select one or few elements you can move them.
<h2>Simple demo</h2>
<div class="row item_container" multiple-selection-zone>
<div multiple-selection-item multiple-drag-item class="well item1" ng-class="{'selecting': isSelecting ,'selected': isSelected,'dragging': isDragging}">Lorem ipsum dolor sit amet alias, sint magni?</div>
<div multiple-selection-item multiple-drag-item class="well item2" ng-class="{'selecting': isSelecting ,'selected': isSelected,'dragging': isDragging}">Lorem ipsum dolor sit amet ad mollitia fugiat minima.</div>
<div multiple-selection-item multiple-drag-item class="well item3" ng-class="{'selecting': isSelecting ,'selected': isSelected,'dragging': isDragging}">Lorem ipsum dolor sit amet autem!</div>
<div multiple-selection-item multiple-drag-item class="well item4" ng-class="{'selecting': isSelecting ,'selected': isSelected,'dragging': isDragging}">Lorem ipsum dolor sit amet beatae.</div>
<div multiple-selection-item multiple-drag-item class="well item5" ng-class="{'selecting': isSelecting ,'selected': isSelected,'dragging': isDragging}">Lorem ipsum dolor sit amet. Iure vitae temporibus maiores perspiciatis!</div>
</div>
</div>
</body>
</html>