mirror of
https://github.com/apache/cordova-plugin-screen-orientation.git
synced 2025-02-23 16:42:50 +08:00
CB-13673 : Remove deprecated platforms
This commit is contained in:
parent
34a9765b4f
commit
374c59a094
14
README.md
14
README.md
@ -23,7 +23,7 @@
|
||||
|
||||
# Cordova Screen Orientation Plugin
|
||||
|
||||
Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, WP8 and Blackberry 10. This plugin is based on [Screen Orientation API](http://www.w3.org/TR/screen-orientation/) so the api matches the current spec.
|
||||
Cordova plugin to set/lock the screen orientation in a common way for iOS, Android, and windows-uwp. This plugin is based on [Screen Orientation API](http://www.w3.org/TR/screen-orientation/) so the api matches the current spec.
|
||||
|
||||
The plugin adds the following to the screen object (`window.screen`):
|
||||
|
||||
@ -113,17 +113,9 @@ screen.orientation.onchange = function(){console.log(screen.orientation.type);
|
||||
|
||||
The __screen.orientation__ property will not update when the phone is [rotated 180 degrees](http://www.quirksmode.org/dom/events/orientationchange.html).
|
||||
|
||||
## BB10 Notes
|
||||
## Windows UWP Notes
|
||||
|
||||
Wraps the com.blackberry.app plugin functions, auto installed as a dependancy.
|
||||
|
||||
## WP8 Notes
|
||||
|
||||
Windows phone does not support specification or primary and secondary orientations. If called with a specific orientation the plugin will just apply the landscape or portait orientation.
|
||||
|
||||
## W8.1 Notes
|
||||
|
||||
Windows 8.1 Applicaitons (runtime/metro applications) will only display orientation changes if the device has some sort of accelerometer. The internal state of the "orientation" will still be kept, but the actual screen won't rotate unless the device supports it.
|
||||
Windows store apps (windows-uwp) will only display orientation changes if the device has some sort of accelerometer. The internal state of the "orientation" will still be kept, but the actual screen won't rotate unless the device supports it.
|
||||
|
||||
# Legacy Changelog
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
"platforms": [
|
||||
"android",
|
||||
"ios",
|
||||
"wp8"
|
||||
"windows"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
|
15
plugin.xml
15
plugin.xml
@ -20,7 +20,7 @@
|
||||
id="cordova-plugin-screen-orientation"
|
||||
version="2.0.3-dev">
|
||||
<name>Screen Orientation</name>
|
||||
<description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS, WP8, W8.1, and BB10.</description>
|
||||
<description>Adds Screen Orientation API lock and unlock functions to the global screen object in android, iOS and windows-uwp.</description>
|
||||
<license>Apache 2.0</license>
|
||||
|
||||
<engines>
|
||||
@ -56,23 +56,10 @@
|
||||
|
||||
</platform>
|
||||
|
||||
<platform name="blackberry10">
|
||||
<dependency id="com.blackberry.app" />
|
||||
<config-file target="www/config.xml" parent="/widget">
|
||||
<feature name="net.yoik.cordova.plugins.screenorientation" value="net.yoik.cordova.plugins.screenorientation" />
|
||||
</config-file>
|
||||
<js-module src="www/screenorientation.bb10.js" name="screenorientation.bb10">
|
||||
<merges target="cordova.plugins.screenorientation" />
|
||||
</js-module>
|
||||
<dependency id="es6-promise-plugin" version="^4.1.0"/>
|
||||
</platform>
|
||||
|
||||
<platform name="windows">
|
||||
<js-module src="src/windows/CDVOrientationProxy.js" name="CDVOrientationProxy">
|
||||
<merges target="" />
|
||||
</js-module>
|
||||
</platform>
|
||||
|
||||
|
||||
|
||||
</plugin>
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
var screenOrientation = {};
|
||||
|
||||
screenOrientation.setOrientation = function(orientation) {
|
||||
if (blackberry.app) {
|
||||
if (orientation === 'unlocked') {
|
||||
blackberry.app.unlockOrientation();
|
||||
} else {
|
||||
blackberry.app.lockOrientation(orientation);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = screenOrientation;
|
Loading…
Reference in New Issue
Block a user