Skip to content

Commit

Permalink
Fixed HammerJS gestures.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielbusarello committed Jul 5, 2020
1 parent 42c70ee commit 5ce4118
Show file tree
Hide file tree
Showing 21 changed files with 233 additions and 173 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.7.1] - 2020-07-05
### Fixed
- HammerJS gestures on slide.

## [0.7.0] - 2020-07-03
### Changed
- Update Angular to new version.
Expand Down Expand Up @@ -93,6 +97,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Angular CLI files.
- Demo application project.

[0.7.1]: https://github.com/gabrielbusarello/material2-carousel/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/gbrlsnchs/material2-carousel/compare/master...gabrielbusarello:v0.7.0
[0.6.0]: https://github.com/gbrlsnchs/material2-carousel/compare/v0.5.1...v0.6.0
[0.5.1]: https://github.com/gbrlsnchs/material2-carousel/compare/v0.5.0...v0.5.1
Expand Down
5 changes: 4 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@
"styles": [
"projects/demo/src/styles.scss"
],
"scripts": []
"scripts": [],
"allowedCommonJsDependencies": [
"hammerjs"
]
},
"configurations": {
"production": {
Expand Down
344 changes: 193 additions & 151 deletions docs/3rdpartylicenses.txt

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Material Carousel - Demo</title>
<base href="https://gbrlsnchs.github.io/material2-carousel/">
<base href="https://gabrielbusarello.github.io/material2-carousel/">

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link
Expand All @@ -18,8 +19,8 @@
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles.14b69ed6694c22ad1255.css"></head>
<link rel="stylesheet" href="styles.20827dd30ef2b1c11d89.css"></head>
<body>
<app-root></app-root>
<script type="text/javascript" src="runtime.26209474bfa8dc87a77c.js"></script><script type="text/javascript" src="polyfills.7deb70c30fc4a10a948e.js"></script><script type="text/javascript" src="main.fa605d52cf03a4f28898.js"></script></body>
<script src="runtime.e227d1a0e31cbccbf8ec.js" defer></script><script src="polyfills-es5.9e6d003fb6d8451ce738.js" nomodule defer></script><script src="polyfills.f0a7b40a793ea8d61577.js" defer></script><script src="main.bd8c71135717c04c4df9.js" defer></script></body>
</html>
7 changes: 4 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<head>
<meta charset="utf-8" />
<title>Material Carousel - Demo</title>
<base href="https://gbrlsnchs.github.io/material2-carousel/">
<base href="https://gabrielbusarello.github.io/material2-carousel/">

<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link
Expand All @@ -18,8 +19,8 @@
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<link rel="stylesheet" href="styles.14b69ed6694c22ad1255.css"></head>
<link rel="stylesheet" href="styles.20827dd30ef2b1c11d89.css"></head>
<body>
<app-root></app-root>
<script type="text/javascript" src="runtime.26209474bfa8dc87a77c.js"></script><script type="text/javascript" src="polyfills.7deb70c30fc4a10a948e.js"></script><script type="text/javascript" src="main.fa605d52cf03a4f28898.js"></script></body>
<script src="runtime.e227d1a0e31cbccbf8ec.js" defer></script><script src="polyfills-es5.9e6d003fb6d8451ce738.js" nomodule defer></script><script src="polyfills.f0a7b40a793ea8d61577.js" defer></script><script src="main.bd8c71135717c04c4df9.js" defer></script></body>
</html>
1 change: 1 addition & 0 deletions docs/main.bd8c71135717c04c4df9.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/main.fa605d52cf03a4f28898.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/polyfills-es5.9e6d003fb6d8451ce738.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/polyfills.7deb70c30fc4a10a948e.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/polyfills.f0a7b40a793ea8d61577.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/runtime.26209474bfa8dc87a77c.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/runtime.e227d1a0e31cbccbf8ec.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs/styles.14b69ed6694c22ad1255.css

This file was deleted.

5 changes: 5 additions & 0 deletions docs/styles.20827dd30ef2b1c11d89.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"ghpages": "ng build demo --prod --output-path docs --base-href \"https://gbrlsnchs.github.io/material2-carousel/\" && cp docs/index.html docs/404.html"
"ghpages": "ng build demo --prod --output-path docs --base-href \"https://gabrielbusarello.github.io/material2-carousel/\" && cp docs/index.html docs/404.html"
},
"private": true,
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions projects/carousel/src/lib/carousel.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { MatCarouselComponent } from './carousel.component';
import { MatCarouselSlideComponent } from './carousel-slide/carousel-slide.component';
import {
HammerGestureConfig,
HAMMER_GESTURE_CONFIG
HAMMER_GESTURE_CONFIG,
HammerModule
} from '@angular/platform-browser';
import { ModuleWithProviders } from '@angular/compiler/src/core';

Expand All @@ -21,7 +22,7 @@ export class MatCarouselHammerConfig extends HammerGestureConfig {
}
@NgModule({
declarations: [MatCarouselComponent, MatCarouselSlideComponent],
imports: [CommonModule, MatButtonModule, MatIconModule],
imports: [CommonModule, MatButtonModule, MatIconModule, HammerModule],
exports: [MatCarouselComponent, MatCarouselSlideComponent]
})
export class MatCarouselModule {
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
(click)="copy()"
>
<mat-icon>assignment</mat-icon>
npm install @ngmodule/material-carousel
npm install @ngbmodule/material-carousel
</button>
</span>

Expand All @@ -23,7 +23,7 @@
</button>
<mat-menu #demoMenu="matMenu">
<a
href="https://github.com/gbrlsnchs/material2-carousel"
href="https://github.com/gabrielbusarello/material2-carousel"
target="_blank"
mat-menu-item
>
Expand Down
4 changes: 2 additions & 2 deletions projects/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MatSnackBar } from '@angular/material/snack-bar';
import {
MatCarouselSlideComponent,
Orientation
} from '@ngmodule/material-carousel';
} from '@ngbmodule/material-carousel';

@Component({
selector: 'app-root',
Expand All @@ -14,7 +14,7 @@ import {
})
export class AppComponent {
private static readonly INSTALL_TEXT =
'npm install @ngmodule/material-carousel';
'npm install @ngbmodule/material-carousel';

public slidesList = new Array<never>(5);
public showContent = false;
Expand Down
2 changes: 1 addition & 1 deletion projects/demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { MatSelectModule } from '@angular/material/select';
import { MatSnackBarModule } from '@angular/material/snack-bar';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTooltipModule } from '@angular/material/tooltip';
import { MatCarouselModule } from '@ngmodule/material-carousel';
import { MatCarouselModule } from '@ngbmodule/material-carousel';

import { AppComponent } from './app.component';

Expand Down
2 changes: 2 additions & 0 deletions projects/demo/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';

import "hammerjs";

if (environment.production) {
enableProdMode();
}
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"typeRoots": ["node_modules/@types"],
"lib": ["es2018", "dom"],
"paths": {
"@ngmodule/material-carousel": ["dist/carousel"],
"@ngmodule/material-carousel/*": ["dist/carousel/*"]
"@ngbmodule/material-carousel": ["dist/carousel"],
"@ngbmodule/material-carousel/*": ["dist/carousel/*"]
},
"plugins": [
{ "name": "@angular/language-service" },
Expand All @@ -30,7 +30,7 @@
"strictInjectionParameters": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true,
// "enableResourceInlining": true,
"enableIvy": false
}
}

0 comments on commit 5ce4118

Please sign in to comment.