PROJTEMP: fix width/height func on JS 49/21149/1
authorgyeongmin.ju <gyeongmin.ju@samsung.com>
Thu, 15 May 2014 10:39:18 +0000 (19:39 +0900)
committergyeongmin.ju <gyeongmin.ju@samsung.com>
Thu, 15 May 2014 10:39:18 +0000 (19:39 +0900)
Signed-off-by: gyeongmin.ju <gyeongmin.ju@samsung.com>
Change-Id: I76f70c3cc923f853e0046afe7ca94af99f7785d3

templates/Template/Tizen Web UI Builder/1.EmptyProject/project/tizen-ui-builder-tool/res/html/ground.js
templates/Template/Tizen Web UI Builder/2.SinglePageProject/project/tizen-ui-builder-tool/res/html/ground.js
templates/Template/Tizen Web UI Builder/3.MultiPageProject/project/tizen-ui-builder-tool/res/html/ground.js
templates/Template/Tizen Web UI Builder/4.NavigationProject/project/tizen-ui-builder-tool/res/html/ground.js

index 7c762a9..b653ff4 100644 (file)
@@ -68,7 +68,7 @@ function genPage2(html) {
                $('[data-old-page=true]').remove();
        });
 }
-
+       
 // changeBody: (html:String) -> ()
 function changeBody(html) {
        $(':mobile-page').page("destroy");
@@ -107,6 +107,8 @@ function changeBody(html) {
 
        // $('[data-role=header]').css('position', 'relative');
        // $('[data-role=footer]').css('position', 'relative').css('top', '0');
+  $(".ui-content").css("overflow", "visible");
+  $(".ui-scrollview-view").css("overflow", "visible");
 }
 
 // showBorder: (wid:String) -> ()
@@ -142,8 +144,8 @@ function getClientBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -174,8 +176,8 @@ function getWindowBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -203,13 +205,14 @@ function getPageBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        return bound;
 }
 
 function getOneWidgetBound(wgt) {
+  var elm = wgt.get(0);
        var loc = wgt.offset();
        var pos = wgt.position();
        var origin = wgt.css("-webkit-transform-origin").split(" ");
@@ -217,6 +220,8 @@ function getOneWidgetBound(wgt) {
        var bound = {
                x : parseInt(loc.left),
                y : parseInt(loc.top),
+               //w : parseInt(elm.getBoundingClientRect().width),
+               //h : parseInt(elm.getBoundingClientRect().height),
                w : parseInt(wgt.outerWidth()),
                h : parseInt(wgt.outerHeight()),
                l : parseInt(wgt.css("margin-left")),
@@ -225,8 +230,8 @@ function getOneWidgetBound(wgt) {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height()),
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
                transform : wgt.css("-webkit-transform"),
                transformOriginX : parseFloat(origin[0]),
                transformOriginY : parseFloat(origin[1]),
index 7c762a9..b653ff4 100644 (file)
@@ -68,7 +68,7 @@ function genPage2(html) {
                $('[data-old-page=true]').remove();
        });
 }
-
+       
 // changeBody: (html:String) -> ()
 function changeBody(html) {
        $(':mobile-page').page("destroy");
@@ -107,6 +107,8 @@ function changeBody(html) {
 
        // $('[data-role=header]').css('position', 'relative');
        // $('[data-role=footer]').css('position', 'relative').css('top', '0');
+  $(".ui-content").css("overflow", "visible");
+  $(".ui-scrollview-view").css("overflow", "visible");
 }
 
 // showBorder: (wid:String) -> ()
@@ -142,8 +144,8 @@ function getClientBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -174,8 +176,8 @@ function getWindowBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -203,13 +205,14 @@ function getPageBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        return bound;
 }
 
 function getOneWidgetBound(wgt) {
+  var elm = wgt.get(0);
        var loc = wgt.offset();
        var pos = wgt.position();
        var origin = wgt.css("-webkit-transform-origin").split(" ");
@@ -217,6 +220,8 @@ function getOneWidgetBound(wgt) {
        var bound = {
                x : parseInt(loc.left),
                y : parseInt(loc.top),
+               //w : parseInt(elm.getBoundingClientRect().width),
+               //h : parseInt(elm.getBoundingClientRect().height),
                w : parseInt(wgt.outerWidth()),
                h : parseInt(wgt.outerHeight()),
                l : parseInt(wgt.css("margin-left")),
@@ -225,8 +230,8 @@ function getOneWidgetBound(wgt) {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height()),
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
                transform : wgt.css("-webkit-transform"),
                transformOriginX : parseFloat(origin[0]),
                transformOriginY : parseFloat(origin[1]),
index 7c762a9..b653ff4 100644 (file)
@@ -68,7 +68,7 @@ function genPage2(html) {
                $('[data-old-page=true]').remove();
        });
 }
-
+       
 // changeBody: (html:String) -> ()
 function changeBody(html) {
        $(':mobile-page').page("destroy");
@@ -107,6 +107,8 @@ function changeBody(html) {
 
        // $('[data-role=header]').css('position', 'relative');
        // $('[data-role=footer]').css('position', 'relative').css('top', '0');
+  $(".ui-content").css("overflow", "visible");
+  $(".ui-scrollview-view").css("overflow", "visible");
 }
 
 // showBorder: (wid:String) -> ()
@@ -142,8 +144,8 @@ function getClientBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -174,8 +176,8 @@ function getWindowBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -203,13 +205,14 @@ function getPageBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        return bound;
 }
 
 function getOneWidgetBound(wgt) {
+  var elm = wgt.get(0);
        var loc = wgt.offset();
        var pos = wgt.position();
        var origin = wgt.css("-webkit-transform-origin").split(" ");
@@ -217,6 +220,8 @@ function getOneWidgetBound(wgt) {
        var bound = {
                x : parseInt(loc.left),
                y : parseInt(loc.top),
+               //w : parseInt(elm.getBoundingClientRect().width),
+               //h : parseInt(elm.getBoundingClientRect().height),
                w : parseInt(wgt.outerWidth()),
                h : parseInt(wgt.outerHeight()),
                l : parseInt(wgt.css("margin-left")),
@@ -225,8 +230,8 @@ function getOneWidgetBound(wgt) {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height()),
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
                transform : wgt.css("-webkit-transform"),
                transformOriginX : parseFloat(origin[0]),
                transformOriginY : parseFloat(origin[1]),
index 7c762a9..b653ff4 100644 (file)
@@ -68,7 +68,7 @@ function genPage2(html) {
                $('[data-old-page=true]').remove();
        });
 }
-
+       
 // changeBody: (html:String) -> ()
 function changeBody(html) {
        $(':mobile-page').page("destroy");
@@ -107,6 +107,8 @@ function changeBody(html) {
 
        // $('[data-role=header]').css('position', 'relative');
        // $('[data-role=footer]').css('position', 'relative').css('top', '0');
+  $(".ui-content").css("overflow", "visible");
+  $(".ui-scrollview-view").css("overflow", "visible");
 }
 
 // showBorder: (wid:String) -> ()
@@ -142,8 +144,8 @@ function getClientBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -174,8 +176,8 @@ function getWindowBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        if (bound.w < 1)
                bound.w = 1;
@@ -203,13 +205,14 @@ function getPageBound() {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height())
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
        };
        return bound;
 }
 
 function getOneWidgetBound(wgt) {
+  var elm = wgt.get(0);
        var loc = wgt.offset();
        var pos = wgt.position();
        var origin = wgt.css("-webkit-transform-origin").split(" ");
@@ -217,6 +220,8 @@ function getOneWidgetBound(wgt) {
        var bound = {
                x : parseInt(loc.left),
                y : parseInt(loc.top),
+               //w : parseInt(elm.getBoundingClientRect().width),
+               //h : parseInt(elm.getBoundingClientRect().height),
                w : parseInt(wgt.outerWidth()),
                h : parseInt(wgt.outerHeight()),
                l : parseInt(wgt.css("margin-left")),
@@ -225,8 +230,8 @@ function getOneWidgetBound(wgt) {
                b : parseInt(wgt.css("margin-bottom")),
                left : parseInt(pos.left),
                top : parseInt(pos.top),
-    width : parseInt(wgt.width()),
-    height : parseInt(wgt.height()),
+    width : parseInt(wgt.css("width")),
+    height : parseInt(wgt.css("height")),
                transform : wgt.css("-webkit-transform"),
                transformOriginX : parseFloat(origin[0]),
                transformOriginY : parseFloat(origin[1]),