Compare commits

...

11 Commits
0.2.2 ... 0.2.4

Author SHA1 Message Date
Steven Gill
4b757c8e73 Merge branch 'dev' 2013-10-28 12:13:55 -07:00
Steven Gill
71ea946746 [CB-5188] Updated version and RELEASENOTES.md for release 0.2.4 2013-10-28 12:08:11 -07:00
hermwong
1cfd009c91 CB-5128: add repo + issue tag to plugin.xml for splashscreen plugin 2013-10-22 14:02:04 -07:00
Steven Gill
8326da4ee2 [CB-5010] Incremented plugin version on dev branch. 2013-10-09 16:06:49 -07:00
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
4 changed files with 71 additions and 58 deletions

View File

@@ -26,3 +26,13 @@
* 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.
### 0.2.4 (Oct 28, 2013)
* CB-5128: add repo + issue tag to plugin.xml for splashscreen plugin
* [CB-5010] Incremented plugin version on dev branch.

View File

@@ -2,11 +2,13 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="org.apache.cordova.splashscreen"
version="0.2.2">
version="0.2.4">
<name>Splashscreen</name>
<description>Cordova Splashscreen Plugin</description>
<license>Apache 2.0</license>
<keywords>cordova,splashscreen</keywords>
<repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git</repo>
<issue>https://issues.apache.org/jira/browse/CB/component/12320653</issue>
<js-module src="www/splashscreen.js" name="SplashScreen">

View File

@@ -170,7 +170,6 @@
// 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;
}

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);