You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-1Lines changed: 40 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Use this option to specify your target container element to apply Macy too. All
34
34
Define the default amount of columns to work with. Use the `breakAt` option to specify breakpoints for this value.
35
35
36
36
#### **trueOrder**
37
-
*Default: `true`*
37
+
*Default: `false`*
38
38
39
39
Setting this to false will prioritise equalising the height of each column over the order of the items themselves.
40
40
@@ -59,6 +59,13 @@ When declaring the default margin as an object it requires both and x and y valu
59
59
*Default: `false`*
60
60
If set to true, Macy will wait for all images on the page to load before running. Set to `false` by default, it will run every time an image loads.
61
61
62
+
63
+
#### **useOwnImageLoader**
64
+
65
+
*Default: `false`*
66
+
67
+
Set this to true if you would prefer to use a different image loaded library.
68
+
62
69
#### **breakAt**
63
70
64
71
*Default: `None`*
@@ -184,6 +191,38 @@ Reinitialises the current macy instance;
184
191
macyInstance.reInit();
185
192
```
186
193
194
+
#### **on**
195
+
*Parameters: {String} - Event key, {Function} the function to run when the event occurs*
196
+
197
+
198
+
This would console log when all images are loaded.
199
+
```javascript
200
+
macyInstance.on(macyInstance.constants.EVENT_IMAGE_COMPLETE. function (ctx) {
201
+
console.log('all images have loaded');
202
+
});
203
+
```
204
+
205
+
#### **emit**
206
+
*Parameters: {String} - Event key*
207
+
208
+
Emit an event, although macy does not utilise most of these events, these are more to trigger your own functions.
209
+
210
+
---
211
+
212
+
## *Constants*
213
+
214
+
Macy now has some constants available to be used with in the events system. This is to make sure the functions are targetting the correct event as the naming may be subject to change
215
+
They are all accessible under `macyInstance.constants`
0 commit comments