@paperbits/core
Advanced tools
Comparing version 0.1.44 to 0.1.45
@@ -56,2 +56,3 @@ import * as ko from "knockout"; | ||
this.model.pictureSourceUrl = undefined; | ||
this.logoUrl(undefined); | ||
} | ||
@@ -58,0 +59,0 @@ |
{ | ||
"name": "@paperbits/core", | ||
"version": "0.1.44", | ||
"version": "0.1.45", | ||
"description": "Paperbits core components.", | ||
@@ -23,4 +23,4 @@ "author": "Paperbits", | ||
"dependencies": { | ||
"@paperbits/common": "0.1.44", | ||
"@paperbits/styles": "0.1.44", | ||
"@paperbits/common": "0.1.45", | ||
"@paperbits/styles": "0.1.45", | ||
"cropperjs": "^1.4.0", | ||
@@ -27,0 +27,0 @@ "file-saver": "^2.0.0", |
@@ -32,2 +32,3 @@ import * as ko from "knockout"; | ||
this.onMediaSelected = this.onMediaSelected.bind(this); | ||
this.setWidgetModel = this.setWidgetModel.bind(this); | ||
this.onChange = this.onChange.bind(this); | ||
@@ -90,11 +91,15 @@ | ||
public onMediaSelected(media: MediaContract): void { | ||
const background = new BackgroundModel(); // TODO: Let's use proper model here | ||
background.sourceKey = media.key; | ||
background.sourceUrl = media.downloadUrl; | ||
background.size = "contain"; | ||
background.position = "center center"; | ||
if (!media) { | ||
this.background(null); | ||
} else { | ||
const background = new BackgroundModel(); // TODO: Let's use proper model here | ||
background.sourceKey = media.key; | ||
background.sourceUrl = media.downloadUrl; | ||
background.size = "contain"; | ||
background.position = "center center"; | ||
// TODO: use window.devicePixelRatio to assign sizes | ||
// TODO: use window.devicePixelRatio to assign sizes | ||
this.background(background); | ||
this.background(background); | ||
} | ||
this.onChange(); | ||
@@ -101,0 +106,0 @@ } |
@@ -107,2 +107,7 @@ import * as ko from "knockout"; | ||
public onMediaSelected(media: MediaContract): void { | ||
if (!media) { | ||
this.clearBackground(); | ||
return; | ||
} | ||
this.activeSlideModel.background.sourceKey = media.key; | ||
@@ -109,0 +114,0 @@ this.activeSlideModel.background.sourceUrl = media.downloadUrl; |
@@ -70,5 +70,9 @@ import * as ko from "knockout"; | ||
public onMediaSelected(media: MediaContract): void { | ||
this.video.sourceUrl = media.downloadUrl; | ||
this.video.sourceKey = media.key; | ||
if (media) { | ||
this.video.sourceUrl = media.downloadUrl; | ||
this.video.sourceKey = media.key; | ||
} else { | ||
this.video.sourceUrl = undefined; | ||
this.video.sourceKey = undefined; | ||
} | ||
this.sourceUrl(this.video.sourceUrl); | ||
@@ -75,0 +79,0 @@ |
@@ -76,2 +76,7 @@ import * as ko from "knockout"; | ||
public async selectNone(): Promise<void> { | ||
this.selectedMedia(undefined); | ||
this.onSelect(undefined); | ||
} | ||
public onMediaUploaded(): void { | ||
@@ -78,0 +83,0 @@ this.searchMedia(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
636964
11860
+ Added@paperbits/common@0.1.45(transitive)
+ Added@paperbits/styles@0.1.45(transitive)
- Removed@paperbits/common@0.1.44(transitive)
- Removed@paperbits/styles@0.1.44(transitive)
Updated@paperbits/common@0.1.45
Updated@paperbits/styles@0.1.45