Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Commit

Permalink
fix(interact): use new npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Lewis committed Dec 14, 2016
1 parent cc6158e commit f14d751
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -45,7 +45,7 @@ The calendar has a few dependencies, these are as follows, and must be included

**Optional dependencies:**
* [ui-bootstrap](http://angular-ui.github.io/bootstrap/) (0.14.0+, optional, include for collapse animations and tooltips.
* [interact.js](http://interactjs.io/) (optional, include to allow drag and drop on the calendar)
* [interactjs](http://interactjs.io/) (optional, include to allow drag and drop on the calendar)
* [ngTouch](https://docs.angularjs.org/api/ngTouch) (optional, include if using the calendar on mobile devices. You will also need to enable `$touchProvider.ngClickOverrideEnabled(true)` on angular 1.5.0+)

You can install through bower:
Expand Down Expand Up @@ -155,7 +155,7 @@ This expression is called when an event is clicked on the calendar. `calendarEve

### on-event-times-changed

This expression is called when an event is dragged and dropped or resized into a different date / time on the calendar. The available values that are passed to the expression are: `calendarEvent`, `calendarNewEventStart`, `calendarNewEventEnd` and `calendarDraggedFromDate` (month view only). The directive won't change the event object and leaves that up to you to implement. Please note drag and drop is only available by including the [interact.js](http://interactjs.io/) library.
This expression is called when an event is dragged and dropped or resized into a different date / time on the calendar. The available values that are passed to the expression are: `calendarEvent`, `calendarNewEventStart`, `calendarNewEventEnd` and `calendarDraggedFromDate` (month view only). The directive won't change the event object and leaves that up to you to implement. Please note drag and drop is only available by including the [interactjs](http://interactjs.io/) library.

### on-timespan-click

Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -65,7 +65,7 @@
"optionalDependencies": {
"angular-touch": ">=1.3.0",
"angular-ui-bootstrap": ">=0.14.0",
"interact.js": ">=1.2.0"
"interactjs": "^1.2.0"
},
"scripts": {
"test": "karma start",
Expand Down
2 changes: 1 addition & 1 deletion src/services/interact.js
Expand Up @@ -3,7 +3,7 @@
var angular = require('angular');
var interact;
try {
interact = require('interact.js');
interact = require('interactjs');
} catch (e) {
/* istanbul ignore next */
interact = null;
Expand Down
6 changes: 3 additions & 3 deletions test/unit/services/interact.spec.js
@@ -1,13 +1,13 @@
'use strict';

var angular = require('angular');
var interactLib = require('interact.js');
var interactLib = require('interactjs');
beforeEach(angular.mock.module('mwl.calendar'));

describe('interact.js', function() {
describe('interactjs', function() {

describe('library exists', function() {
it('should be the interact.js library', inject(function(interact) {
it('should be the interactjs library', inject(function(interact) {

expect(interact).to.eql(interactLib);

Expand Down
6 changes: 3 additions & 3 deletions webpack.config.build.js
Expand Up @@ -40,10 +40,10 @@ module.exports = {
externals: {
angular: 'angular',
moment: 'moment',
'interact.js': {
'interactjs': {
root: 'interact',
commonjs: 'interact.js',
commonjs2: 'interact.js',
commonjs: 'interactjs',
commonjs2: 'interactjs',
amd: 'interact'
}
},
Expand Down

0 comments on commit f14d751

Please sign in to comment.