Skip to content

Commit

Permalink
Merge pull request #15 from nteske/desktopLandscapeSupport
Browse files Browse the repository at this point in the history
Landscape Support On Desktop Disabled
  • Loading branch information
hariszupcevic authored Apr 5, 2021
2 parents 8073377 + 3e85d07 commit bbde186
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
40 changes: 23 additions & 17 deletions widget/controllers/widget.home.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,26 +75,32 @@
WidgetHome.initRotate();
}
WidgetHome.initRotate = function () {
if(!oneTime)buildfire.appearance.titlebar.hide();
var iFrame = document.getElementById("slideFrame");
if(iFrame && !oneTime)
{
oneTime=true;
setTimeout(function(){
iFrame.style.webkitTransform = 'rotate(90deg)';
iFrame.style.mozTransform = 'rotate(90deg)';
iFrame.style.msTransform = 'rotate(90deg)';
iFrame.style.oTransform = 'rotate(90deg)';
iFrame.style.transform = "rotate(90deg)";
if(!buildfire.isWeb()){
if(!oneTime)buildfire.appearance.titlebar.hide();
var iFrame = document.getElementById("slideFrame");
if(iFrame && !oneTime)
{
oneTime=true;
setTimeout(function(){
iFrame.style.webkitTransform = 'rotate(90deg)';
iFrame.style.mozTransform = 'rotate(90deg)';
iFrame.style.msTransform = 'rotate(90deg)';
iFrame.style.oTransform = 'rotate(90deg)';
iFrame.style.transform = "rotate(90deg)";

WidgetHome.setRotateSize();

if(buildfire.isWeb())
window.addEventListener("resize",function(){
WidgetHome.setRotateSize();
});
}, 500);

if(buildfire.isWeb())
window.addEventListener("resize",function(){
WidgetHome.setRotateSize();
});
}, 500);
}
}
}

WidgetHome.isWeb = function () {
return buildfire.isWeb();
}

WidgetHome.goBack= function () {
Expand Down
2 changes: 1 addition & 1 deletion widget/css/landscape.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ iframe{
position: absolute;
overflow: hidden;
top: 11px;
left: 33px;
left: 40px;
z-index: 1040;
cursor: pointer;
width: 41px;
Expand Down
2 changes: 1 addition & 1 deletion widget/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
ng-if="WidgetHome.data.content.url"
style="height: 100%;position: relative" onload="rotateFromIndex()">
</iframe>
<div ng-hide="WidgetHome.isItHomeScreen" ng-click="WidgetHome.goBack()" class="menuClass titleBarBackgroundTheme" >
<div ng-if="!WidgetHome.isWeb()" ng-hide="WidgetHome.isItHomeScreen" ng-click="WidgetHome.goBack()" class="menuClass titleBarBackgroundTheme" >
<a id="btnBack" class="back-btn-icon icon icon-chevron-left titleBarTextAndIcons"></a>
</div>
</div>
Expand Down

0 comments on commit bbde186

Please sign in to comment.