moving to angular rc2
This commit is contained in:
parent
a8abab434d
commit
a18ce4ed96
@ -3,8 +3,7 @@
|
|||||||
import {Component, ElementRef, ViewChild, QueryList} from "@angular/core";
|
import {Component, ElementRef, ViewChild, QueryList} from "@angular/core";
|
||||||
import {Photo} from "../../../../common/entities/Photo";
|
import {Photo} from "../../../../common/entities/Photo";
|
||||||
import {GalleryPhotoComponent} from "../grid/photo/photo.grid.gallery.component.ts";
|
import {GalleryPhotoComponent} from "../grid/photo/photo.grid.gallery.component.ts";
|
||||||
import {AnimationBuilder} from "@angular/platform-browser/src/animate/animation_builder";
|
import {BrowserDomAdapter} from "@angular/platform-browser/src/browser/browser_adapter";
|
||||||
import {BrowserDomAdapter} from "@angular/platform-browser/src/browser_common";
|
|
||||||
import {Dimension} from "../../model/IRenderable";
|
import {Dimension} from "../../model/IRenderable";
|
||||||
import {GalleryLightboxPhotoComponent} from "./photo/photo.lightbox.gallery.component";
|
import {GalleryLightboxPhotoComponent} from "./photo/photo.lightbox.gallery.component";
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ export class GalleryLightboxComponent {
|
|||||||
private dom:BrowserDomAdapter;
|
private dom:BrowserDomAdapter;
|
||||||
|
|
||||||
|
|
||||||
constructor(private animBuilder:AnimationBuilder) {
|
constructor() {
|
||||||
this.dom = new BrowserDomAdapter();
|
this.dom = new BrowserDomAdapter();
|
||||||
|
|
||||||
|
|
||||||
@ -171,7 +170,7 @@ export class GalleryLightboxComponent {
|
|||||||
this.forceAnimateTo(fromImage,
|
this.forceAnimateTo(fromImage,
|
||||||
toImage,
|
toImage,
|
||||||
this.imgContainer.nativeElement.nativeElement);
|
this.imgContainer.nativeElement.nativeElement);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +187,7 @@ export class GalleryLightboxComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private forceAnimateFrom(from, to, elemnet) {
|
private forceAnimateFrom(from, to, elemnet) {
|
||||||
let anim0 = this.animBuilder.css();
|
/* let anim0 = this.animBuilder.css();
|
||||||
anim0.setDuration(0);
|
anim0.setDuration(0);
|
||||||
anim0.setToStyles(from);
|
anim0.setToStyles(from);
|
||||||
anim0.start(elemnet).onComplete(()=> {
|
anim0.start(elemnet).onComplete(()=> {
|
||||||
@ -198,12 +197,12 @@ export class GalleryLightboxComponent {
|
|||||||
anim1.setFromStyles(from);
|
anim1.setFromStyles(from);
|
||||||
anim1.setToStyles(to);
|
anim1.setToStyles(to);
|
||||||
anim1.start(elemnet);
|
anim1.start(elemnet);
|
||||||
});
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private forceAnimateTo(from, to, elemnet, innerTo = null, onComplete = ()=> {
|
private forceAnimateTo(from, to, elemnet, innerTo = null, onComplete = ()=> {
|
||||||
}) {
|
}) {
|
||||||
if (innerTo == null) {
|
/* if (innerTo == null) {
|
||||||
innerTo = to;
|
innerTo = to;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,11 +215,11 @@ export class GalleryLightboxComponent {
|
|||||||
anim1.setDuration(0);
|
anim1.setDuration(0);
|
||||||
anim1.setToStyles(innerTo);
|
anim1.setToStyles(innerTo);
|
||||||
anim1.start(elemnet).onComplete(onComplete);
|
anim1.start(elemnet).onComplete(onComplete);
|
||||||
});
|
});*/
|
||||||
|
onComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private getBodyScrollTop() {
|
private getBodyScrollTop() {
|
||||||
return this.dom.getProperty(this.dom.query('body'), 'scrollTop');
|
return this.dom.getProperty(this.dom.query('body'), 'scrollTop');
|
||||||
}
|
}
|
||||||
|
|||||||
22
package.json
22
package.json
@ -21,15 +21,16 @@
|
|||||||
"url": "https://github.com/bpatrik/PiGallery2/issues"
|
"url": "https://github.com/bpatrik/PiGallery2/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/common": "2.0.0-rc.1",
|
"@angular/http": "2.0.0-rc.2",
|
||||||
"@angular/compiler": "2.0.0-rc.1",
|
"@angular/common": "2.0.0-rc.2",
|
||||||
"@angular/core": "2.0.0-rc.1",
|
"@angular/compiler": "2.0.0-rc.2",
|
||||||
"@angular/http": "2.0.0-rc.1",
|
"@angular/core": "2.0.0-rc.2",
|
||||||
"@angular/platform-browser": "2.0.0-rc.1",
|
"@angular/platform-browser": "2.0.0-rc.2",
|
||||||
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
|
"@angular/platform-browser-dynamic": "2.0.0-rc.2",
|
||||||
"@angular/platform-server": "2.0.0-rc.1",
|
"@angular/platform-server": "2.0.0-rc.2",
|
||||||
"@angular/router": "2.0.0-rc.1",
|
"@angular/router": "2.0.0-rc.2",
|
||||||
"@angular/router-deprecated": "2.0.0-rc.1",
|
"@angular/router-deprecated": "2.0.0-rc.2",
|
||||||
|
|
||||||
"body-parser": "^1.15.1",
|
"body-parser": "^1.15.1",
|
||||||
"core-js": "^2.4.0",
|
"core-js": "^2.4.0",
|
||||||
"debug": "^2.2.0",
|
"debug": "^2.2.0",
|
||||||
@ -89,8 +90,5 @@
|
|||||||
"tslint-loader": "^2.1.3",
|
"tslint-loader": "^2.1.3",
|
||||||
"typedoc": "^0.3.12",
|
"typedoc": "^0.3.12",
|
||||||
"url-loader": "^0.5.7"
|
"url-loader": "^0.5.7"
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.12.10 <5.6"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user