Skip to content

Commit 17bb1db

Browse files
committed
Merge pull request taye#103 from pborreli/typos
Fixed typos
2 parents 5d8be88 + 48086a9 commit 17bb1db

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Demos
1818
-----
1919

2020
- http://interactjs.io has some demos showing drag and drop, gestures,
21-
ienrtia, snap and some other things.
21+
inertia, snap and some other things.
2222
- The [html & svg demo](http://interactjs.io/repo/demo/html_svg.html "drag, drop,
2323
resize and gesture demo") shows div elements which can be dragged and
24-
dropped onto each other and resized by dragging the botom and right edges. The
24+
dropped onto each other and resized by dragging the bottom and right edges. The
2525
yellow elements are SVG elements (these won't show up on IE8).
2626
- [star.svg](http://interactjs.io/repo/demo/star.svg "editing an SVG document")
2727
demonstrates interact.js being used within an SVG document.
@@ -118,7 +118,7 @@ be chained nicely.
118118

119119
For example, to make a DOM element fire drag and resize events you can do:
120120

121-
```jacascript
121+
```javascript
122122
interact(document.getElementById('anElement'))
123123
.draggable (true)
124124
.resizable(true);
@@ -171,7 +171,7 @@ first parameter.
171171

172172
InteractEvent properties include the usual properties of mouse/touch events
173173
such as pageX/Y, clientX/Y, modifier keys etc. but also some properties
174-
providing information about the change in cordinates and event specific data.
174+
providing information about the change in coordinates and event specific data.
175175
The table below displays all of these events.
176176

177177
#### InteractEvent properties
@@ -196,7 +196,7 @@ The table below displays all of these events.
196196
| Dropzones | |
197197
| ----------------------- | --------------------------------------------------|
198198
| **drop(de)activate**, **dropmove**, **drag(enter\|leave)**, **drop** | |
199-
| `draggable` | The dragagble element that was dropped into this dropzone |
199+
| `draggable` | The draggable element that was dropped into this dropzone |
200200
| | |
201201
202202
| Resize | |
@@ -235,7 +235,7 @@ dropMoveEvent = {
235235

236236
### Interacting
237237
One way to move an element in response to a dragmove is to add a listener that
238-
transforms the element accoding to `dy` and `dx` of the InteractEvent.
238+
transforms the element according to `dy` and `dx` of the InteractEvent.
239239

240240
```javascript
241241
// Set element and listen for dragmove events

demo/dropzones.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>Highlight dropzones with interajct.js</title>
5+
<title>Highlight dropzones with interact.js</title>
66
<script src="../interact.js"></script>
77
<script src="js/dropzones.js"></script>
88
<link rel="stylesheet" href="css/dropzones.css">

demo/gallery.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
#gallery .thumbnail.expanded {
4444
opacity: 0;
45-
transition: opacity: 0.1s;
45+
transition: opacity 0.1s;
4646
}
4747

4848
#gallery .stage {

interact.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1427,7 +1427,7 @@
14271427
},
14281428

14291429
// Determine action to be performed on next pointerMove and add appropriate
1430-
// style and event Liseners
1430+
// style and event Listeners
14311431
pointerDown: function (pointer, event, eventTarget, curEventTarget, forceAction) {
14321432
if (!forceAction && !this.inertiaStatus.active && this.pointerWasMoved && this.prepared) {
14331433
this.checkAndPreventDefault(event, this.target, this.element);
@@ -2071,7 +2071,7 @@
20712071
// setActiveDrops should always be called when a drag has just started or a
20722072
// drag event happens while dynamicDrop is true
20732073
setActiveDrops: function (dragElement) {
2074-
// get dropzones and their elements that could recieve the draggable
2074+
// get dropzones and their elements that could receive the draggable
20752075
var possibleDrops = this.collectDrops(dragElement, true);
20762076

20772077
this.activeDrops.dropzones = possibleDrops.dropzones;
@@ -2101,7 +2101,7 @@
21012101
: null);
21022102
}
21032103

2104-
// get the most apprpriate dropzone based on DOM depth and order
2104+
// get the most appropriate dropzone based on DOM depth and order
21052105
var dropIndex = indexOfDeepestElement(validDrops),
21062106
dropzone = this.activeDrops.dropzones[dropIndex] || null,
21072107
element = this.activeDrops.elements [dropIndex] || null;
@@ -2116,7 +2116,7 @@
21162116
var dragLeaveEvent = null,
21172117
dragEnterEvent = null,
21182118
dropActivateEvent = null,
2119-
dropDectivateEvent = null,
2119+
dropDeactivateEvent = null,
21202120
dropMoveEvent = null,
21212121
dropEvent = null;
21222122

@@ -2147,8 +2147,8 @@
21472147
dropActivateEvent.draggable = dragEvent.interactable;
21482148
}
21492149
if (dragEvent.type === 'dragend') {
2150-
dropDectivateEvent = new InteractEvent(this, pointerEvent, 'drop', 'deactivate', this.element, dragEvent.target);
2151-
dropDectivateEvent.draggable = dragEvent.interactable;
2150+
dropDeactivateEvent = new InteractEvent(this, pointerEvent, 'drop', 'deactivate', this.element, dragEvent.target);
2151+
dropDeactivateEvent.draggable = dragEvent.interactable;
21522152
}
21532153
if (dragEvent.type === 'dragmove' && this.dropTarget) {
21542154
dropMoveEvent = {
@@ -2166,7 +2166,7 @@
21662166
enter : dragEnterEvent,
21672167
leave : dragLeaveEvent,
21682168
activate : dropActivateEvent,
2169-
deactivate : dropDectivateEvent,
2169+
deactivate : dropDeactivateEvent,
21702170
move : dropMoveEvent,
21712171
drop : dropEvent
21722172
};
@@ -2318,13 +2318,13 @@
23182318
this.pointerIds.splice(index, 1);
23192319

23202320
// move events are kept so that multi-touch properties can still be
2321-
// calculated at the end of a GestureEvnt sequence
2321+
// calculated at the end of a GestureEvent sequence
23222322
//this.pointers.splice(index, 1);
23232323
},
23242324

23252325
recordPointer: function (pointer) {
23262326
// Do not update pointers while inertia is active.
2327-
// The inertiastart event should be this.pointers[0]
2327+
// The inertia start event should be this.pointers[0]
23282328
if (this.inertiaStatus.active) { return; }
23292329

23302330
var index = this.mouse? 0: indexOf(this.pointerIds, getPointerId(pointer));
@@ -3457,7 +3457,7 @@
34573457
* Returns or sets whether elements can be dropped onto this
34583458
* Interactable to trigger drop events
34593459
*
3460-
* Dropzones can recieve the following events:
3460+
* Dropzones can receive the following events:
34613461
* - `dragactivate` and `dragdeactivate` when an acceptable drag starts and ends
34623462
* - `dragenter` and `dragleave` when a draggable enters and leaves the dropzone
34633463
* - `drop` when a draggable is dropped into this dropzone
@@ -3467,7 +3467,7 @@
34673467
* Use the `overlap` option to set how drops are checked for. The allowed values are:
34683468
* - `'pointer'`, the pointer must be over the dropzone (default)
34693469
* - `'center'`, the draggable element's center must be over the dropzone
3470-
* - a number from 0-1 which is the `(intersetion area) / (draggable area)`.
3470+
* - a number from 0-1 which is the `(intersection area) / (draggable area)`.
34713471
* e.g. `0.5` for drop to happen when half of the area of the
34723472
* draggable is over the dropzone
34733473
*
@@ -3519,7 +3519,7 @@
35193519
*
35203520
- pointer (MouseEvent | PointerEvent | Touch) The event that ends a drag
35213521
- draggable (Interactable) The Interactable being dragged
3522-
- draggableElement (ELement) The actual element that's being dragged
3522+
- draggableElement (Element) The actual element that's being dragged
35233523
- dropElement (Element) The dropzone element
35243524
- rect (object) #optional The rect of dropElement
35253525
= (boolean) whether the pointer was over this Interactable
@@ -3852,7 +3852,7 @@
38523852
> Usage
38533853
| interact('.handle').snap({
38543854
| mode : 'grid', // event coords should snap to the corners of a grid
3855-
| range : Infinity, // the effective distance of snap ponts
3855+
| range : Infinity, // the effective distance of snap points
38563856
| grid : { x: 100, y: 100 }, // the x and y spacing of the grid points
38573857
| gridOffset : { x: 0, y: 0 }, // the offset of the grid points
38583858
| });
@@ -3959,7 +3959,7 @@
39593959
| // high values slow the object down more quickly
39603960
| resistance : 16,
39613961
|
3962-
| // the minimum launch speed (pixels per second) that results in inertiastart
3962+
| // the minimum launch speed (pixels per second) that results in inertia start
39633963
| minSpeed : 200,
39643964
|
39653965
| // inertia will stop when the object slows down to this speed
@@ -4491,7 +4491,7 @@
44914491
* Interactable.fire
44924492
[ method ]
44934493
*
4494-
* Calls listeners for the given InteractEvent type bound globablly
4494+
* Calls listeners for the given InteractEvent type bound globally
44954495
* and directly to this Interactable
44964496
*
44974497
- iEvent (InteractEvent) The InteractEvent object to be fired on this Interactable
@@ -4827,7 +4827,7 @@
48274827
globalEvents[type].push(listener);
48284828
}
48294829
}
4830-
// If non InteratEvent type, addEventListener to document
4830+
// If non InteractEvent type, addEventListener to document
48314831
else {
48324832
events.add(docTarget, type, listener, useCapture);
48334833
}
@@ -5026,7 +5026,7 @@
50265026
};
50275027
};
50285028

5029-
// expose the functions used to caluclate multi-touch properties
5029+
// expose the functions used to calculate multi-touch properties
50305030
interact.getTouchAverage = touchAverage;
50315031
interact.getTouchBBox = touchBBox;
50325032
interact.getTouchDistance = touchDistance;

0 commit comments

Comments
 (0)