CB-8940 Setting z-index values to maximum for UI buttons. This closes #140.
This commit is contained in:
parent
b3376e2389
commit
ef5484a2aa
@ -73,6 +73,9 @@ var windowsPhoneVideoContainers = [".avi", ".3gp", ".3g2", ".wmv", ".3gp", ".3g
|
|||||||
// Default aspect ratio 1.78 (16:9 hd video standard)
|
// Default aspect ratio 1.78 (16:9 hd video standard)
|
||||||
var DEFAULT_ASPECT_RATIO = '1.8';
|
var DEFAULT_ASPECT_RATIO = '1.8';
|
||||||
|
|
||||||
|
// Highest possible z-index supported across browsers. Anything used above is converted to this value.
|
||||||
|
var HIGHEST_POSSIBLE_Z_INDEX = 2147483647;
|
||||||
|
|
||||||
// Resize method
|
// Resize method
|
||||||
function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) {
|
function resizeImage(successCallback, errorCallback, file, targetWidth, targetHeight, encodingType) {
|
||||||
var tempPhotoFileName = "";
|
var tempPhotoFileName = "";
|
||||||
@ -329,18 +332,18 @@ function takePictureFromCameraWP(successCallback, errorCallback, args) {
|
|||||||
// Create fullscreen preview
|
// Create fullscreen preview
|
||||||
// z-order style element for capturePreview and cameraCancelButton elts
|
// z-order style element for capturePreview and cameraCancelButton elts
|
||||||
// is necessary to avoid overriding by another page elements, -1 sometimes is not enough
|
// is necessary to avoid overriding by another page elements, -1 sometimes is not enough
|
||||||
capturePreview = document.createElement("video");
|
capturePreview = document.createElement("video");
|
||||||
capturePreview.style.cssText = "position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 999;";
|
capturePreview.style.cssText = "position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: " + (HIGHEST_POSSIBLE_Z_INDEX - 1) + ";";
|
||||||
|
|
||||||
// Create capture button
|
// Create capture button
|
||||||
cameraCaptureButton = document.createElement("button");
|
cameraCaptureButton = document.createElement("button");
|
||||||
cameraCaptureButton.innerText = "Take";
|
cameraCaptureButton.innerText = "Take";
|
||||||
cameraCaptureButton.style.cssText = buttonStyle + "position: fixed; left: 0; bottom: 0; margin: 20px; z-index: 1000";
|
cameraCaptureButton.style.cssText = buttonStyle + "position: fixed; left: 0; bottom: 0; margin: 20px; z-index: " + HIGHEST_POSSIBLE_Z_INDEX + ";";
|
||||||
|
|
||||||
// Create cancel button
|
// Create cancel button
|
||||||
cameraCancelButton = document.createElement("button");
|
cameraCancelButton = document.createElement("button");
|
||||||
cameraCancelButton.innerText = "Cancel";
|
cameraCancelButton.innerText = "Cancel";
|
||||||
cameraCancelButton.style.cssText = buttonStyle + "position: fixed; right: 0; bottom: 0; margin: 20px; z-index: 1000";
|
cameraCancelButton.style.cssText = buttonStyle + "position: fixed; right: 0; bottom: 0; margin: 20px; z-index: " + HIGHEST_POSSIBLE_Z_INDEX + ";";
|
||||||
|
|
||||||
capture = new CaptureNS.MediaCapture();
|
capture = new CaptureNS.MediaCapture();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user