mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:16:45 +02:00
Visual fixes; Select only 1 image at a time
This commit is contained in:
parent
d295b5a69d
commit
0ead9e5a24
2 changed files with 14 additions and 3 deletions
|
@ -82,6 +82,7 @@ input[type=button].naked:active {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
#snapshot-images img {
|
#snapshot-images img {
|
||||||
|
|
|
@ -62,7 +62,7 @@ function addImage(image_data, isGifLoading, canShare, isShowingPreviousImages, b
|
||||||
imageContainer.id = id;
|
imageContainer.id = id;
|
||||||
imageContainer.style.width = "95%";
|
imageContainer.style.width = "95%";
|
||||||
imageContainer.style.height = "240px";
|
imageContainer.style.height = "240px";
|
||||||
imageContainer.style.margin = "5px 0";
|
imageContainer.style.margin = "5px auto";
|
||||||
imageContainer.style.display = "flex";
|
imageContainer.style.display = "flex";
|
||||||
imageContainer.style.justifyContent = "center";
|
imageContainer.style.justifyContent = "center";
|
||||||
imageContainer.style.alignItems = "center";
|
imageContainer.style.alignItems = "center";
|
||||||
|
@ -150,6 +150,15 @@ function selectImageToShare(selectedID, isSelected) {
|
||||||
shareBar.style.backgroundColor = "rgba(0, 0, 0, 0.5)";
|
shareBar.style.backgroundColor = "rgba(0, 0, 0, 0.5)";
|
||||||
|
|
||||||
shareButtonsDiv.style.visibility = "visible";
|
shareButtonsDiv.style.visibility = "visible";
|
||||||
|
|
||||||
|
var containers = document.getElementsByClassName("shareControls");
|
||||||
|
var parentID;
|
||||||
|
for (var i = 0; i < containers.length; ++i) {
|
||||||
|
parentID = containers[i].id.slice(0, 2);
|
||||||
|
if (parentID !== selectedID) {
|
||||||
|
selectImageToShare(parentID, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
showShareButtonsButton.onclick = function () { selectImageToShare(selectedID, true) };
|
showShareButtonsButton.onclick = function () { selectImageToShare(selectedID, true) };
|
||||||
showShareButtonsButton.classList.remove("active");
|
showShareButtonsButton.classList.remove("active");
|
||||||
|
@ -232,7 +241,7 @@ function handleCaptureSetting(setting) {
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
// Uncomment the line below to test functionality in a browser.
|
// Uncomment the line below to test functionality in a browser.
|
||||||
// See definition of "testInBrowser()" to modify tests.
|
// See definition of "testInBrowser()" to modify tests.
|
||||||
//testInBrowser(false);
|
testInBrowser(false);
|
||||||
openEventBridge(function () {
|
openEventBridge(function () {
|
||||||
// Set up a handler for receiving the data, and tell the .js we are ready to receive it.
|
// Set up a handler for receiving the data, and tell the .js we are ready to receive it.
|
||||||
EventBridge.scriptEventReceived.connect(function (message) {
|
EventBridge.scriptEventReceived.connect(function (message) {
|
||||||
|
@ -330,6 +339,7 @@ function testInBrowser(isTestingSetupInstructions) {
|
||||||
} else {
|
} else {
|
||||||
imageCount = 1;
|
imageCount = 1;
|
||||||
//addImage({ localPath: 'http://lorempixel.com/553/255' });
|
//addImage({ localPath: 'http://lorempixel.com/553/255' });
|
||||||
addImage({ localPath: 'C:/Users/valef/Desktop/hifi-snap-by-zfox-on-2017-04-26_10-26-53.gif' }, false, true, true, false, false);
|
addImage({ localPath: 'C:/Users/valef/Desktop/hifi-snap-by-zfox-on-2017-05-01_15-48-15.gif' }, false, true, true, false, false);
|
||||||
|
addImage({ localPath: 'C:/Users/valef/Desktop/hifi-snap-by-zfox-on-2017-05-01_15-48-15.jpg' }, false, true, true, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue