diff --git a/Manifest.json b/Manifest.json
index 184acf14..f577d475 100644
--- a/Manifest.json
+++ b/Manifest.json
@@ -37,7 +37,7 @@
]
},
"requires": {
- "@qooxdoo/compiler": "^1.0.0-beta",
- "@qooxdoo/framework": "^6.0.0-beta"
+ "@qooxdoo/compiler": "^1.0.0",
+ "@qooxdoo/framework": "^6.0.0"
}
}
\ No newline at end of file
diff --git a/source/class/qxl/mobileshowcase/Application.js b/source/class/qxl/mobileshowcase/Application.js
index 27edac0d..65b21067 100644
--- a/source/class/qxl/mobileshowcase/Application.js
+++ b/source/class/qxl/mobileshowcase/Application.js
@@ -40,14 +40,12 @@ qx.Class.define("qxl.mobileshowcase.Application",
* This method contains the initial application code and gets called
* during startup of the application
*/
- main : function()
- {
+ main : function() {
// Call super class
this.base(arguments);
// Enable logging in debug variant
- if (qx.core.Environment.get("qx.debug"))
- {
+ if (qx.core.Environment.get("qx.debug")) {
// support native logging capabilities, e.g. Firebug for Firefox
qx.log.appender.Native;
}
diff --git a/source/class/qxl/mobileshowcase/page/Abstract.js b/source/class/qxl/mobileshowcase/page/Abstract.js
index 1b4b7bc2..ba595e33 100644
--- a/source/class/qxl/mobileshowcase/page/Abstract.js
+++ b/source/class/qxl/mobileshowcase/page/Abstract.js
@@ -23,8 +23,7 @@ qx.Class.define("qxl.mobileshowcase.page.Abstract",
{
extend : qx.ui.mobile.page.NavigationPage,
- construct : function(wrapContentByGroup)
- {
+ construct : function(wrapContentByGroup) {
this.base(arguments, wrapContentByGroup);
this.setShowBackButton(true);
this.setBackButtonText("Back");
@@ -34,8 +33,7 @@ qx.Class.define("qxl.mobileshowcase.page.Abstract",
members :
{
// overridden
- _back : function()
- {
+ _back : function() {
qx.core.Init.getApplication().getRouting().back();
}
}
diff --git a/source/class/qxl/mobileshowcase/page/Animation.js b/source/class/qxl/mobileshowcase/page/Animation.js
index f4497b7e..306a1ad7 100644
--- a/source/class/qxl/mobileshowcase/page/Animation.js
+++ b/source/class/qxl/mobileshowcase/page/Animation.js
@@ -23,8 +23,7 @@ qx.Class.define("qxl.mobileshowcase.page.Animation",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
+ construct : function() {
this.base(arguments);
this.setTitle("Page Transitions");
},
@@ -59,13 +58,11 @@ qx.Class.define("qxl.mobileshowcase.page.Animation",
members :
{
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
var list = new qx.ui.mobile.list.List({
- configureItem : function(item, data, row)
- {
+ configureItem : function(item, data, row) {
item.setTitle(data.title);
item.setShowArrow(true);
}
@@ -85,4 +82,4 @@ qx.Class.define("qxl.mobileshowcase.page.Animation",
this.getContent().add(list);
}
}
-});
\ No newline at end of file
+});
diff --git a/source/class/qxl/mobileshowcase/page/AnimationLanding.js b/source/class/qxl/mobileshowcase/page/AnimationLanding.js
index ef6901b1..5d3d8f79 100644
--- a/source/class/qxl/mobileshowcase/page/AnimationLanding.js
+++ b/source/class/qxl/mobileshowcase/page/AnimationLanding.js
@@ -25,8 +25,7 @@ qx.Class.define("qxl.mobileshowcase.page.AnimationLanding",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
+ construct : function() {
this.base(arguments, true);
this.setTitle("Page Transitions");
this.setShowBackButtonOnTablet(true);
@@ -47,8 +46,7 @@ qx.Class.define("qxl.mobileshowcase.page.AnimationLanding",
members :
{
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
@@ -86,9 +84,8 @@ qx.Class.define("qxl.mobileshowcase.page.AnimationLanding",
// overridden
- _back : function()
- {
+ _back : function() {
qx.core.Init.getApplication().getRouting().executeGet("/animation", {animation:this.getAnimation(), reverse:true});
}
}
-});
\ No newline at end of file
+});
diff --git a/source/class/qxl/mobileshowcase/page/Basic.js b/source/class/qxl/mobileshowcase/page/Basic.js
index 25182d6e..53478ecc 100644
--- a/source/class/qxl/mobileshowcase/page/Basic.js
+++ b/source/class/qxl/mobileshowcase/page/Basic.js
@@ -29,8 +29,7 @@ qx.Class.define("qxl.mobileshowcase.page.Basic",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
+ construct : function() {
this.base(arguments, false);
this.setTitle("Basic Widgets");
this._widgets = [];
@@ -43,8 +42,7 @@ qx.Class.define("qxl.mobileshowcase.page.Basic",
_widgets : null,
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
// BASIC WIDGET CHANGE MENU
@@ -111,7 +109,7 @@ qx.Class.define("qxl.mobileshowcase.page.Basic",
this.getContent().add(new qx.ui.mobile.form.Title("ToggleButton"));
- var toggleButtonGroup = new qx.ui.mobile.form.Group;
+ var toggleButtonGroup = new qx.ui.mobile.form.Group();
toggleButtonGroup.add(exToggleButton);
this.getContent().add(toggleButtonGroup);
diff --git a/source/class/qxl/mobileshowcase/page/Canvas.js b/source/class/qxl/mobileshowcase/page/Canvas.js
index 9a2b4a67..c8b3973b 100644
--- a/source/class/qxl/mobileshowcase/page/Canvas.js
+++ b/source/class/qxl/mobileshowcase/page/Canvas.js
@@ -26,9 +26,8 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
- this.base(arguments,false);
+ construct : function() {
+ this.base(arguments, false);
this.setTitle("Canvas");
this.__ratio = qx.core.Environment.get("device.pixelRatio");
},
@@ -45,8 +44,7 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
this.__lastPoint = {};
@@ -73,8 +71,8 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
canvas.setWidth(this._to(this.__canvasSize));
canvas.setHeight(this._to(this.__canvasSize));
- qx.bom.element.Style.set(canvas.getContentElement(),"width", this.__canvasSize + "px");
- qx.bom.element.Style.set(canvas.getContentElement(),"height", this.__canvasSize + "px");
+ qx.bom.element.Style.set(canvas.getContentElement(), "width", this.__canvasSize + "px");
+ qx.bom.element.Style.set(canvas.getContentElement(), "height", this.__canvasSize + "px");
this.getContent().add(canvas);
@@ -89,9 +87,10 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
/**
- * Calculates the correct position in relation to the device pixel ratio.
- * @return {Number} the correct position.
- */
+ * Calculates the correct position in relation to the device pixel ratio.
+ * @param value
+ * @return {Number} the correct position.
+ */
_to : function(value) {
return value * this.__ratio;
},
@@ -103,12 +102,12 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
_drawExample : function() {
// Comment in Text
var ctx = this.__canvas.getContext2d();
- ctx.fillStyle = 'gray';
- ctx.font = 'bold '+this._to(16)+'px Helvetica';
- ctx.fillText('Start drawing here ...', this._to(15), this._to(25));
+ ctx.fillStyle = "gray";
+ ctx.font = "bold "+this._to(16)+"px Helvetica";
+ ctx.fillText("Start drawing here ...", this._to(15), this._to(25));
// Smiley
- ctx.strokeStyle = '#3D72C9';
+ ctx.strokeStyle = "#3D72C9";
ctx.beginPath();
ctx.arc(475, 85, 50, 0, Math.PI * 2, true);
ctx.moveTo(510, 85);
@@ -136,6 +135,7 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
/**
* Handles the trackstart
event on canvas.
+ * @param evt
*/
_onTrackStart : function(evt) {
this.__canvasLeft = qx.bom.element.Location.getLeft(this.__canvas.getContentElement(), "padding");
@@ -147,6 +147,7 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
/**
* Handles the track
event on canvas.
+ * @param evt
*/
_onTrack : function(evt) {
this.__draw(evt);
@@ -157,6 +158,7 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
/**
* Handles the trackend
event on canvas.
+ * @param evt
*/
_onTrackEnd : function(evt) {
this.__lastPoint = {};
@@ -165,6 +167,7 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
/**
* Draws the line on canvas.
+ * @param evt
*/
__draw: function(evt) {
var ctx = this.__canvas.getContext2d();
@@ -177,14 +180,14 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
if (lastPoint) {
ctx.beginPath();
- ctx.lineCap = 'round';
+ ctx.lineCap = "round";
ctx.moveTo(this._to(lastPoint.x), this._to(lastPoint.y));
ctx.lineTo(this._to(pointerLeft), this._to(pointerTop));
var deltaX = Math.abs(lastPoint.x - pointerLeft);
var deltaY = Math.abs(lastPoint.y - pointerTop);
- var velocity = Math.sqrt(Math.pow(deltaX ,2) + Math.pow(deltaY ,2));
+ var velocity = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
opacity = (100 - velocity) / 100;
opacity = Math.round(opacity * Math.pow(10, 2)) / Math.pow(10, 2);
@@ -198,8 +201,8 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
// linear gradient from start to end of line
var grad = ctx.createLinearGradient(lastPoint.x, lastPoint.y, pointerLeft, pointerTop);
- grad.addColorStop(0, 'rgba(61,114,201,' + lastPoint.opacity + ')');
- grad.addColorStop(1, 'rgba(61,114,201,' + opacity + ')');
+ grad.addColorStop(0, "rgba(61,114,201," + lastPoint.opacity + ")");
+ grad.addColorStop(1, "rgba(61,114,201," + opacity + ")");
ctx.strokeStyle = grad;
ctx.lineWidth = this._to(1.5);
@@ -216,8 +219,7 @@ qx.Class.define("qxl.mobileshowcase.page.Canvas",
},
- destruct : function()
- {
+ destruct : function() {
this._disposeObjects();
}
diff --git a/source/class/qxl/mobileshowcase/page/Carousel.js b/source/class/qxl/mobileshowcase/page/Carousel.js
index 3bdbbe49..bf9785ce 100644
--- a/source/class/qxl/mobileshowcase/page/Carousel.js
+++ b/source/class/qxl/mobileshowcase/page/Carousel.js
@@ -23,8 +23,7 @@ qx.Class.define("qxl.mobileshowcase.page.Carousel",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
+ construct : function() {
this.base(arguments);
this.setTitle("Carousel");
},
@@ -58,7 +57,7 @@ qx.Class.define("qxl.mobileshowcase.page.Carousel",
nextButton.addListener("tap", function() {
setTimeout(function() {
carousel.nextPage();
- }.bind(this), 0);
+ }, 0);
}, carousel);
var previousButton = new qx.ui.mobile.form.Button("Previous Page");
@@ -66,10 +65,10 @@ qx.Class.define("qxl.mobileshowcase.page.Carousel",
previousButton.addListener("tap", function() {
setTimeout(function() {
carousel.previousPage();
- }.bind(this), 0);
+ }, 0);
}, carousel);
- var page3group = new qx.ui.mobile.form.Group([previousButton,nextButton],false);
+ var page3group = new qx.ui.mobile.form.Group([previousButton, nextButton], false);
page3group.setLayout(new qx.ui.mobile.layout.HBox());
page3.add(page3group);
@@ -79,7 +78,7 @@ qx.Class.define("qxl.mobileshowcase.page.Carousel",
var page5 = new qx.ui.mobile.container.Composite();
page5.addCssClass("carousel-example-5");
- page5.add(new qx.ui.mobile.basic.Label("You can add as many pages as you want."),{flex:1});
+ page5.add(new qx.ui.mobile.basic.Label("You can add as many pages as you want."), {flex:1});
var moreButton = new qx.ui.mobile.form.Button("Add more pages");
moreButton.addCssClass("example-button");
@@ -101,14 +100,14 @@ qx.Class.define("qxl.mobileshowcase.page.Carousel",
}
}, carousel);
- var moreGroup = new qx.ui.mobile.form.Group([moreButton],false);
+ var moreGroup = new qx.ui.mobile.form.Group([moreButton], false);
moreGroup.setLayout(new qx.ui.mobile.layout.HBox());
page5.add(moreGroup);
var page6 = new qx.ui.mobile.container.Composite();
page6.addCssClass("carousel-example-6");
- page6.add(new qx.ui.mobile.basic.Label("Previous page is shown when you swipe right."),{flex:1});
+ page6.add(new qx.ui.mobile.basic.Label("Previous page is shown when you swipe right."), {flex:1});
carousel.add(page1);
carousel.add(page2);
@@ -126,4 +125,4 @@ qx.Class.define("qxl.mobileshowcase.page.Carousel",
return null;
}
}
-});
\ No newline at end of file
+});
diff --git a/source/class/qxl/mobileshowcase/page/DataBinding.js b/source/class/qxl/mobileshowcase/page/DataBinding.js
index c98c914c..5be27358 100644
--- a/source/class/qxl/mobileshowcase/page/DataBinding.js
+++ b/source/class/qxl/mobileshowcase/page/DataBinding.js
@@ -23,8 +23,7 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
+ construct : function() {
this.base(arguments);
this.setTitle("Data Binding");
@@ -76,8 +75,7 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
this.__form = this.__createSliderDataBindings();
@@ -119,12 +117,11 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
/**
* Reacts on tap of Stop time button.
*/
- __onStopTimeButtonTap : function ()
- {
+ __onStopTimeButtonTap : function () {
var now = new Date();
var date = now.toLocaleTimeString();
- this.getListData().insertAt(0,date);
+ this.getListData().insertAt(0, date);
this.__list.setVisibility("visible");
},
@@ -133,8 +130,7 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
/**
* Called on interval event of timer.
*/
- __onInterval : function()
- {
+ __onInterval : function() {
var old = parseInt(this.__dataLabel.getValue(), 10);
if (this.__increaseMode) {
if (old < 500) {
@@ -142,13 +138,11 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
} else {
this.__timer.stop();
}
- } else {
- if (old > 0) {
+ } else if (old > 0) {
this.__dataLabel.setValue(old - 1);
} else {
this.__timer.stop();
}
- }
},
@@ -163,8 +157,7 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
/**
* Called on button increase.
*/
- __onIncrease : function()
- {
+ __onIncrease : function() {
this.__increaseMode = true;
this.__timer.start();
},
@@ -173,8 +166,7 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
/**
* Called on button decrease.
*/
- __onDecrease : function()
- {
+ __onDecrease : function() {
this.__increaseMode = false;
this.__timer.start();
},
@@ -183,13 +175,12 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
/**
* Creates the slider and slider value label and binds vice-versa.
*/
- __createSliderDataBindings : function()
- {
+ __createSliderDataBindings : function() {
var form = new qx.ui.mobile.form.Form();
this.__slider = new qx.ui.mobile.form.Slider();
this.__slider.setDisplayValue("value");
this.__slider.setMaximum(500);
- form.add(this.__slider,"Move slider:");
+ form.add(this.__slider, "Move slider:");
this.__dataLabel = new qx.ui.mobile.form.TextField();
this.__dataLabel.setValue("0");
@@ -211,8 +202,7 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
var self = this;
var list = new qx.ui.mobile.list.List({
- configureItem : function(item, data, row)
- {
+ configureItem : function(item, data, row) {
var stopCount = self.getListData().getLength()-row;
item.setTitle("Stop #"+stopCount);
item.setSubtitle(data);
@@ -232,4 +222,4 @@ qx.Class.define("qxl.mobileshowcase.page.DataBinding",
"__slider", "__form", "__list");
}
}
-});
\ No newline at end of file
+});
diff --git a/source/class/qxl/mobileshowcase/page/Dialog.js b/source/class/qxl/mobileshowcase/page/Dialog.js
index d16ee56b..e20c0a17 100644
--- a/source/class/qxl/mobileshowcase/page/Dialog.js
+++ b/source/class/qxl/mobileshowcase/page/Dialog.js
@@ -26,9 +26,8 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
- this.base(arguments,false);
+ construct : function() {
+ this.base(arguments, false);
this.setTitle("Dialog Widgets");
},
@@ -47,8 +46,7 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
this.__resultsLabel = new qx.ui.mobile.basic.Label("No events received so far.");
@@ -125,23 +123,23 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
this.__menu.show();
}, this);
- var popupGroup = new qx.ui.mobile.form.Group([],false);
+ var popupGroup = new qx.ui.mobile.form.Group([], false);
popupGroup.add(this._createGroupTitle("Popup"));
popupGroup.setLayout(new qx.ui.mobile.layout.VBox());
- popupGroup.add(showPopupButton,{flex:1});
- popupGroup.add(showAnchorButton,{flex:1});
+ popupGroup.add(showPopupButton, {flex:1});
+ popupGroup.add(showAnchorButton, {flex:1});
- var menuGroup = new qx.ui.mobile.form.Group([],false);
+ var menuGroup = new qx.ui.mobile.form.Group([], false);
menuGroup.add(this._createGroupTitle("Menu"));
menuGroup.setLayout(new qx.ui.mobile.layout.VBox());
- menuGroup.add(showMenuButton,{flex:1});
- menuGroup.add(showAnchorMenuButton,{flex:1});
+ menuGroup.add(showMenuButton, {flex:1});
+ menuGroup.add(showAnchorMenuButton, {flex:1});
- var otherGroup = new qx.ui.mobile.form.Group([],false);
+ var otherGroup = new qx.ui.mobile.form.Group([], false);
otherGroup.add(this._createGroupTitle("Other"));
otherGroup.setLayout(new qx.ui.mobile.layout.VBox());
- otherGroup.add(busyIndicatorButton,{flex:1});
- otherGroup.add(showPickerButton,{flex:1});
+ otherGroup.add(busyIndicatorButton, {flex:1});
+ otherGroup.add(showPickerButton, {flex:1});
var groupContainer = new qx.ui.mobile.container.Composite();
groupContainer.addCssClass("dialog-group");
@@ -166,7 +164,7 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
pickerDialog.setTitle("Picker");
var picker = this.__picker = new qx.ui.mobile.control.Picker();
- picker.addListener("changeSelection", this.__onPickerChangeSelection,this);
+ picker.addListener("changeSelection", this.__onPickerChangeSelection, this);
this.__pickerDaySlotData = this._createDayPickerSlot(0, new Date().getFullYear());
picker.addSlot(this.__pickerDaySlotData);
@@ -234,9 +232,9 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
/**
* Creates the anchor popup.
+ * @param anchor
*/
- __createAnchorPopup : function(anchor)
- {
+ __createAnchorPopup : function(anchor) {
if (this.__anchorPopup) {
return this.__anchorPopup;
}
@@ -263,10 +261,11 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
/**
* Reacts on "changeSelection" event on picker, and displays the values on resultsLabel.
+ * @param e
*/
__onPickerChangeSelection : function(e) {
if (e.getData().slot > 0) {
- if(this._updatePickerTimer) {
+ if (this._updatePickerTimer) {
clearTimeout(this._updatePickerTimer);
this._updatePickerTimer = null;
}
@@ -298,12 +297,12 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
var oldDayData = this.__picker.getModel().getItem(0);
var diff = slotData.length - oldDayData.length;
if (diff < 0) {
- for (var i = 0; i < -diff; i++) {
+ for (let i = 0; i < -diff; i++) {
oldDayData.pop();
}
} else if (diff > 0) {
var ref = oldDayData.length;
- for (var i = 0; i < diff; i++) {
+ for (let i = 0; i < diff; i++) {
oldDayData.push({
title: "" + (ref + i + 1)
});
@@ -315,9 +314,10 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
/**
- * Creates a group title for the dialow showcase.
- * @return {qx.ui.mobile.form.Label} the group title label.
- */
+ * Creates a group title for the dialow showcase.
+ * @param value
+ * @return {qx.ui.mobile.form.Label} the group title label.
+ */
_createGroupTitle : function(value) {
var titleLabel = new qx.ui.mobile.basic.Label(value);
titleLabel.addCssClass("dialog-group-title");
@@ -328,6 +328,7 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
/**
* Reacts on "confirmSelection" event on picker, and displays the values on resultsLabel.
+ * @param e
*/
__onPickerConfirmSelection : function(e) {
this.__resultsLabel.setValue("");
@@ -341,9 +342,10 @@ qx.Class.define("qxl.mobileshowcase.page.Dialog",
/**
* Reacts on "changeSelection" event on Menu, and displays the values on resultsLabel.
+ * @param e
*/
__onMenuChangeSelection : function(e) {
this.__resultsLabel.setValue("Received changeSelection from Menu Dialog. [index: "+ e.getData().index+ "] [item: "+ e.getData().item+"]");
}
}
-});
\ No newline at end of file
+});
diff --git a/source/class/qxl/mobileshowcase/page/Drawer.js b/source/class/qxl/mobileshowcase/page/Drawer.js
index 4d728ca6..9e61fe95 100644
--- a/source/class/qxl/mobileshowcase/page/Drawer.js
+++ b/source/class/qxl/mobileshowcase/page/Drawer.js
@@ -23,8 +23,7 @@ qx.Class.define("qxl.mobileshowcase.page.Drawer",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
+ construct : function() {
this.base(arguments, false);
this.setTitle("Drawer");
},
@@ -32,7 +31,10 @@ qx.Class.define("qxl.mobileshowcase.page.Drawer",
members :
{
- /** Factory method for creation of drawers. */
+ /**
+ * Factory method for creation of drawers.
+ * @param orientation
+ */
_createDrawer : function(orientation) {
var drawer = new qx.ui.mobile.container.Drawer(this, new qx.ui.mobile.layout.VBox());
drawer.setOrientation(orientation);
@@ -42,7 +44,10 @@ qx.Class.define("qxl.mobileshowcase.page.Drawer",
},
- /** Factory method for the a demo drawer's content. */
+ /**
+ * Factory method for the a demo drawer's content.
+ * @param target
+ */
_createDrawerContent : function(target) {
var closeDrawerButton = new qx.ui.mobile.form.Button("Close");
closeDrawerButton.addListener("tap", function() {
@@ -54,10 +59,13 @@ qx.Class.define("qxl.mobileshowcase.page.Drawer",
},
- /** Factory method for the a drawer menu. */
+ /**
+ * Factory method for the a drawer menu.
+ * @param drawers
+ */
_createDrawerMenu : function(drawers) {
var drawerGroup = new qx.ui.mobile.form.Group();
- for(var i = 0; i < drawers.length; i++) {
+ for (var i = 0; i < drawers.length; i++) {
var openDrawerButton = new qx.ui.mobile.form.Button("Open "+drawers[i].getOrientation() +" drawer");
openDrawerButton.addListener("tap", drawers[i].show, drawers[i]);
drawerGroup.add(openDrawerButton);
@@ -68,8 +76,7 @@ qx.Class.define("qxl.mobileshowcase.page.Drawer",
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
// DRAWERS
@@ -119,4 +126,4 @@ qx.Class.define("qxl.mobileshowcase.page.Drawer",
this.getContent().add(this._createDrawerMenu([drawerTop, drawerRight, drawerBottom, drawerLeft]));
}
}
-});
\ No newline at end of file
+});
diff --git a/source/class/qxl/mobileshowcase/page/Event.js b/source/class/qxl/mobileshowcase/page/Event.js
index a648b6a6..cd589b37 100644
--- a/source/class/qxl/mobileshowcase/page/Event.js
+++ b/source/class/qxl/mobileshowcase/page/Event.js
@@ -24,8 +24,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
{
extend : qxl.mobileshowcase.page.Abstract,
- construct : function()
- {
+ construct : function() {
this.base(arguments, false);
this.setTitle("Events");
@@ -33,7 +32,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
this.__pointers = {};
- if(qx.core.Environment.get("browser.name")=="firefox") {
+ if (qx.core.Environment.get("browser.name")=="firefox") {
this.__vendorPrefix = "moz";
} else if (qx.core.Environment.get("engine.name") == "mshtml") {
this.__vendorPrefix = "ms";
@@ -66,11 +65,10 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
// overridden
- _initialize : function()
- {
+ _initialize : function() {
this.base(arguments);
- var container = this.__showcaseContainer = new qx.ui.mobile.container.Composite(new qx.ui.mobile.layout.VBox().set({
+ var container = this.__showcaseContainer = new qx.ui.mobile.container.Composite(new qx.ui.mobile.layout.VBox().set({
alignX : "center",
alignY : "middle"
}));
@@ -116,10 +114,10 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
this.__gestureTarget.setTranslateX(-5000);
// If OS is Android 2 remove HTML5 badge logo, because Android is not able to scale and rotate on the same element.
- var isAndroid2 = (qx.core.Environment.get("os.name") == "android")
- && (parseInt(qx.core.Environment.get("os.version").charAt(0)) < 4);
+ var isAndroid2 = (qx.core.Environment.get("os.name") == "android") &&
+ (parseInt(qx.core.Environment.get("os.version").charAt(0)) < 4);
- if(isAndroid2) {
+ if (isAndroid2) {
this.__gestureTarget.exclude();
}
@@ -144,7 +142,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
var descriptionText = "Testing Pointer Events: Touch / Tap / Swipe the area
\n\
Testing Multi-Pointer Events: Touch the area with multiple fingers
\n\
";
- if(!isAndroid2) {
+ if (!isAndroid2) {
descriptionText += "Testing Pinch/Zoom Gesture: Touch HTML5 logo with two fingers
";
}
descriptionText += "Testing OrientationChange Event: Rotate your device / change browser size";
@@ -157,7 +155,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
this.getContent().add(containerGroup, {flex:1});
// Center background gradient, when multiple pointers are available.
- qx.bom.element.Style.set(this.__container.getContentElement(),"background","-"+this.__vendorPrefix+"-radial-gradient(50% 50%, cover, #1a82f7, #2F2727)");
+ qx.bom.element.Style.set(this.__container.getContentElement(), "background", "-"+this.__vendorPrefix+"-radial-gradient(50% 50%, cover, #1a82f7, #2F2727)");
// Start rendering
qx.bom.AnimationFrame.request(this._renderLabel, this);
@@ -197,7 +195,6 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
/**
* Event handler.
*
- * @param evt {qx.event.type.Track} The track event.
*/
__onTrackEnd : function() {
if (qx.core.Environment.get("qx.mobile.nativescroll") === false) {
@@ -229,8 +226,8 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
var scale = evt.getScale() * this.__initialScale;
this.__currentScale = (Math.round(scale * 100) / 100);
- this.__currentScale = Math.max(this.__currentScale,this.__minScale);
- this.__currentScale = Math.min(this.__currentScale,this.__maxScale);
+ this.__currentScale = Math.max(this.__currentScale, this.__minScale);
+ this.__currentScale = Math.min(this.__currentScale, this.__maxScale);
qx.bom.AnimationFrame.request(this._renderLogo, this);
},
@@ -243,7 +240,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
*/
_onGesture : function(evt) {
var pointer = this.__pointers[evt.getPointerId()];
- if(pointer) {
+ if (pointer) {
this.__pointers[evt.getPointerId()].events.push(evt.getType());
}
qx.bom.AnimationFrame.request(this._renderLabel, this);
@@ -286,7 +283,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
* @param x {Integer} pointer position x.
* @param y {Integer} pointer position y.
*/
- _setPointerCirclePosition : function(pointerId,x,y) {
+ _setPointerCirclePosition : function(pointerId, x, y) {
// Disable pointer circles Windows Phone 8 as no pointer-events:none is available.
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
return;
@@ -308,7 +305,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
_getPointerPosition : function(evt) {
var containerLeft = qx.bom.element.Location.getLeft(this.__container.getContentElement(), "padding");
var containerTop = qx.bom.element.Location.getTop(this.__container.getContentElement(), "padding");
- return [evt.getViewportLeft() - containerLeft,evt.getViewportTop() - containerTop];
+ return [evt.getViewportLeft() - containerLeft, evt.getViewportTop() - containerTop];
},
@@ -317,15 +314,14 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
*
* @param evt {qx.event.type.Pointer} The pointer event.
*/
- _onPointer : function(evt)
- {
+ _onPointer : function(evt) {
var type = evt.getType();
var pointerId = evt.getPointerId();
if (type == "pointerdown") {
for (var key in this.__pointers) {
var pointerToDelete = this.__pointers[key];
- if(pointerToDelete.remove) {
+ if (pointerToDelete.remove) {
delete this.__pointers[key];
}
}
@@ -344,14 +340,14 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
this._updatePointerPosition(evt);
}
- if(type == "pointermove") {
+ if (type == "pointermove") {
this._updatePointerPosition(evt);
}
- if(this.__pointers[pointerId] && !this.__pointers[pointerId].remove) {
+ if (this.__pointers[pointerId] && !this.__pointers[pointerId].remove) {
var pointerEvents = this.__pointers[pointerId].events;
- if(pointerEvents.length > 0) {
+ if (pointerEvents.length > 0) {
var lastEventType = pointerEvents[pointerEvents.length -1];
if (lastEventType != type) {
pointerEvents.push(type);
@@ -365,7 +361,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
// Remove all circles out of visible area
this._resetPointerPosition(pointerId);
- if(evt.isPrimary()) {
+ if (evt.isPrimary()) {
this.__initialRotation = this.__currentRotation;
this.__initialScale = this.__currentScale;
}
@@ -387,7 +383,7 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
// Render HTML5 logo: rotation and scale.
var gestureTargetElement = this.__gestureTarget.getContentElement();
- var transitionValue = "translate(" + (this.__logoLeft) + "px" + "," + (this.__logoTop) + "px) ";
+ var transitionValue = "translate(" + (this.__logoLeft) + "px," + (this.__logoTop) + "px) ";
transitionValue = transitionValue + " scale(" + (this.__currentScale) + ")";
transitionValue = transitionValue + " rotate(" + (this.__currentRotation) + "deg)";
@@ -402,13 +398,13 @@ qx.Class.define("qxl.mobileshowcase.page.Event",
var labelBuffer = "";
for (var pointerId in this.__pointers) {
var pointer = this.__pointers[pointerId];
- labelBuffer = labelBuffer + "