Compare commits

...

16 Commits

Author SHA1 Message Date
Steven Gill
b0543eee77 Merge branch 'dev' 2013-10-09 15:44:00 -07:00
Steven Gill
0b733d1797 [CB-5010] Updated version and RELEASENOTES.md for release 0.2.3 2013-10-09 15:33:12 -07:00
Shazron Abdullah
c2dea2fc02 [CB-4806] (Re-fix) Update splashscreen image bounds for iOS 7 2013-10-01 13:26:05 -07:00
purplecabbage
abc62a5eda Merge branch 'CB-4934' of https://github.com/csantanapr/cordova-plugin-splashscreen into dev 2013-09-26 16:14:11 -07:00
Carlos Santana
2dc0f42b8f [CB-4934] plugin-splashscreen should not show by default on Windows8 2013-09-26 17:54:43 -04:00
Carlos Santana
71a8c9cc33 [CB-4929] plugin-splashscreen not loading proxy windows8 2013-09-26 15:20:22 -04:00
Steven Gill
52b6c539d3 [CB-4915] Incremented plugin version on dev branch. 2013-09-25 18:34:15 -07:00
Steven Gill
10e7e9a1d5 Merge branch 'dev' 2013-09-25 18:19:29 -07:00
Steven Gill
f1aed7d844 [CB-4915] Updated version and RELEASENOTES.md for release 0.2.2 2013-09-25 17:56:18 -07:00
Anis Kadri
87a701004d CB-4889 bumping&resetting version 2013-09-25 17:50:50 +02:00
Anis Kadri
4ce42a0c99 CB-4889 renaming org.apache.cordova.core.splashscreen to org.apache.cordova.splashscreen 2013-09-21 12:38:51 +02:00
Andrew Grieve
d937fcb43b Rename CHANGELOG.md -> RELEASENOTES.md 2013-09-17 11:36:13 -04:00
Shazron Abdullah
4275e57a73 Revert "[CB-4806] Update splashscreen image bounds for iOS 7"
This reverts commit 96d5875dc3.
2013-09-16 17:27:09 -07:00
Shazron Abdullah
1111c8b3b9 [CB-4806] Update splashscreen image bounds for iOS 7 2013-09-16 17:26:48 -07:00
Shazron Abdullah
96d5875dc3 [CB-4806] Update splashscreen image bounds for iOS 7 2013-09-13 15:58:36 -07:00
Andrew Grieve
5f83eda5e8 [CB-4752] Incremented plugin version on dev branch. 2013-09-06 00:58:22 -04:00
4 changed files with 74 additions and 59 deletions

View File

@@ -20,4 +20,15 @@
-->
# Release Notes
### 0.2.2 (Sept 25, 2013)
* CB-4889 bumping&resetting version
* CB-4889 renaming org.apache.cordova.core.splashscreen to org.apache.cordova.splashscreen
* Rename CHANGELOG.md -> RELEASENOTES.md
* [CB-4806] Update splashscreen image bounds for iOS 7
* [CB-4752] Incremented plugin version on dev branch.
### 0.2.3 (Oct 9, 2013)
* [CB-4806] (Re-fix) Update splashscreen image bounds for iOS 7
* [CB-4934] plugin-splashscreen should not show by default on Windows8
* [CB-4929] plugin-splashscreen not loading proxy windows8
* [CB-4915] Incremented plugin version on dev branch.

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="org.apache.cordova.core.splashscreen"
version="0.2.0">
id="org.apache.cordova.splashscreen"
version="0.2.3">
<name>Splashscreen</name>
<description>Cordova Splashscreen Plugin</description>
<license>Apache 2.0</license>

View File

@@ -170,7 +170,9 @@
// There's a special case when the image is the size of the screen.
if (CGSizeEqualToSize(screenSize, imgBounds.size)) {
CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil];
imgBounds.origin.y -= statusFrame.size.height;
if (!(IsAtLeastiOSVersion(@"7.0"))) {
imgBounds.origin.y -= statusFrame.size.height;
}
} else {
CGRect viewBounds = self.viewController.view.bounds;
CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height;

View File

@@ -19,75 +19,77 @@
*
*/
/*global Windows:true */
/*jslint sloppy:true */
/*global Windows:true, require, module, window, document, WinJS */
var cordova = require('cordova'),
channel = require('cordova/channel');
var cordova = require('cordova'),
channel = require('cordova/channel');
/* This is the actual implementation part that returns the result on Windows 8
*/
var position = { x: 0, y: 0, width: 0, height: 0 }; // defined by evt.detail.splashScreen.imageLocation
var splash = null; //
var localSplash; // the image to display
var localSplashImage;
var bgColor = "#464646";
var position = { x: 0, y: 0, width: 0, height: 0 }; // defined by evt.detail.splashScreen.imageLocation
var splash = null; //
var localSplash; // the image to display
var localSplashImage;
var bgColor = "#464646";
function onResize(evt) {
if (splash) {
position = splash.imageLocation;
updateImageLocation();
function updateImageLocation() {
localSplash.style.width = window.innerWidth + "px";
localSplash.style.height = window.innerHeight + "px";
localSplash.style.top = "0px";
localSplash.style.left = "0px";
localSplashImage.style.top = position.y + "px";
localSplashImage.style.left = position.x + "px";
localSplashImage.style.height = position.height + "px";
localSplashImage.style.width = position.width + "px";
}
function onResize(evt) {
if (splash) {
position = splash.imageLocation;
updateImageLocation();
}
}
var SplashScreen = {
setBGColor: function (cssBGColor) {
bgColor = cssBGColor;
if (localSplash) {
localSplash.style.backgroundColor = bgColor;
}
},
show: function () {
window.addEventListener("resize", onResize, false);
localSplash = document.createElement("div");
localSplash.style.backgroundColor = bgColor;
localSplash.style.position = "absolute";
localSplashImage = document.createElement("img");
localSplashImage.src = "img/splashscreen.png";
localSplashImage.style.position = "absolute";
updateImageLocation();
localSplash.appendChild(localSplashImage);
document.body.appendChild(localSplash);
},
hide: function () {
window.removeEventListener("resize", onResize, false);
document.body.removeChild(localSplash);
localSplash = null;
}
};
function updateImageLocation() {
localSplash.style.width = window.innerWidth + "px";
localSplash.style.height = window.innerHeight + "px";
localSplash.style.top = "0px";
localSplash.style.left = "0px";
localSplashImage.style.top = position.y + "px";
localSplashImage.style.left = position.x + "px";
localSplashImage.style.height = position.height + "px";
localSplashImage.style.width = position.width + "px";
}
var SplashScreen = {
setBGColor:function(cssBGColor) {
bgColor = cssBGColor;
if (localSplash) {
localSplash.style.backgroundColor = bgColor;
}
},
show:function(){
window.addEventListener("resize", onResize, false);
localSplash = document.createElement("div");
localSplash.style.backgroundColor = bgColor;;
localSplash.style.position = "absolute";
var img = localSplashImage = document.createElement("img");
img.src = "img/splashscreen.png";
img.style.position = "absolute";
updateImageLocation();
localSplash.appendChild(localSplashImage);
document.body.appendChild(localSplash);
},
hide:function(){
window.removeEventListener("resize", onResize, false);
document.body.removeChild(localSplash);
localSplash = null;
}
}
module.exports = SplashScreen;
module.exports = SplashScreen;
function activated(evt) {
if (evt.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
splash = evt.detail.splashScreen;
position = evt.detail.splashScreen.imageLocation;
SplashScreen.show();
}
}
@@ -100,5 +102,5 @@ channel.onCordovaReady.subscribe(function (evt) {
}, false);
});
require("cordova/commandProxy").add("SplashScreen",SplashScreen);
require("cordova/windows8/commandProxy").add("SplashScreen", SplashScreen);