diff options
author | Lasse Räihä <lasse.raiha@digia.com> | 2013-04-23 11:44:40 +0300 |
---|---|---|
committer | Kimmo Ollila <kimmo.ollila@digia.com> | 2013-04-23 11:51:08 +0300 |
commit | 0e81efe070d2fd829932c0bc988e1670542042b0 (patch) | |
tree | a9b0b2bfc562132ebbb0f77152443011a5cc2bd3 | |
parent | 497f690769731c8390ce82bd9a30cd22daf860b2 (diff) |
Added rssnews-reader. Removed unnecessary properties of the Slide.
Change-Id: I72a15144b3a5d4f0811137b0989dc1aec9e66219
Reviewed-by: Kimmo Ollila <kimmo.ollila@digia.com>
-rw-r--r-- | QtDemo/qml/QtDemo/Slide.qml | 7 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/content/BusyIndicator.qml | 53 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/content/CategoryDelegate.qml | 82 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/content/NewsDelegate.qml | 71 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/content/RssFeeds.qml | 56 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/content/ScrollBar.qml | 107 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/content/images/busy.png | bin | 0 -> 2629 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/content/images/scrollbar.png | bin | 0 -> 161 bytes | |||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/rssnews.qml | 95 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/rssnews/rssnews.qmlproject | 16 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml | 2 | ||||
-rw-r--r-- | QtDemo/qml/QtDemo/engine.js | 6 |
12 files changed, 484 insertions, 11 deletions
diff --git a/QtDemo/qml/QtDemo/Slide.qml b/QtDemo/qml/QtDemo/Slide.qml index d3ca97d..153629b 100644 --- a/QtDemo/qml/QtDemo/Slide.qml +++ b/QtDemo/qml/QtDemo/Slide.qml @@ -19,9 +19,6 @@ Rectangle { property real targetScale: 1 property real targetAngle: device === 0 ? -90 : 0 - property int maskWidth: 867 - property int maskHeight: 520 - property int demoWidth: 603 property int demoHeight: 378 @@ -72,8 +69,8 @@ Rectangle { device === 2 ? "images/MedicalDevice_mask.png" : device === 3 ? "images/Laptop_mask.png" : "" - width: maskWidth - height: maskHeight + width: slide.width + height: slide.height z: 2 } diff --git a/QtDemo/qml/QtDemo/demos/rssnews/content/BusyIndicator.qml b/QtDemo/qml/QtDemo/demos/rssnews/content/BusyIndicator.qml new file mode 100644 index 0000000..c16f582 --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/content/BusyIndicator.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Image { + id: container + property bool on: false + + source: "images/busy.png"; visible: container.on + + NumberAnimation on rotation { + running: container.on; from: 0; to: 360; loops: Animation.Infinite; duration: 1200 + } +} diff --git a/QtDemo/qml/QtDemo/demos/rssnews/content/CategoryDelegate.qml b/QtDemo/qml/QtDemo/demos/rssnews/content/CategoryDelegate.qml new file mode 100644 index 0000000..c46d423 --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/content/CategoryDelegate.qml @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: delegate + + width: delegate.ListView.view.width; height: 60 + + Text { + text: name + color: delegate.ListView.isCurrentItem ? "white" : "black" + font { family: "Helvetica"; pixelSize: 18; bold: true } + anchors { + left: parent.left; leftMargin: 15 + verticalCenter: parent.verticalCenter + } + } + + BusyIndicator { + scale: 0.6 + on: delegate.ListView.isCurrentItem && window.loading + anchors { right: parent.right; rightMargin: 10; verticalCenter: parent.verticalCenter } + } + + Rectangle { + width: delegate.width; height: 1; color: "#cccccc" + anchors.bottom: delegate.bottom + visible: delegate.ListView.isCurrentItem ? false : true + } + Rectangle { + width: delegate.width; height: 1; color: "white" + visible: delegate.ListView.isCurrentItem ? false : true + } + + MouseArea { + anchors.fill: delegate + onClicked: { + delegate.ListView.view.currentIndex = index + window.currentFeed = feed + } + } +} diff --git a/QtDemo/qml/QtDemo/demos/rssnews/content/NewsDelegate.qml b/QtDemo/qml/QtDemo/demos/rssnews/content/NewsDelegate.qml new file mode 100644 index 0000000..ec39510 --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/content/NewsDelegate.qml @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: delegate + height: column.height + 40 + width: delegate.ListView.view.width + + Column { + id: column + x: 20; y: 20 + width: parent.width - 40 + + Text { + id: titleText + text: title; width: parent.width; wrapMode: Text.WordWrap + font { bold: true; family: "Helvetica"; pointSize: 16 } + } + + Text { + id: descriptionText + width: parent.width; text: description + wrapMode: Text.WordWrap; font.family: "Helvetica" + } + } + + Rectangle { + width: parent.width; height: 1; color: "#cccccc" + anchors.bottom: parent.bottom + } +} diff --git a/QtDemo/qml/QtDemo/demos/rssnews/content/RssFeeds.qml b/QtDemo/qml/QtDemo/demos/rssnews/content/RssFeeds.qml new file mode 100644 index 0000000..a51b491 --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/content/RssFeeds.qml @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +ListModel { + id: rssFeeds + + ListElement { name: "Top Stories"; feed: "finance.yahoo.com/rss/topstories" } + ListElement { name: "Popular Stories"; feed: "finance.yahoo.com/rss/popularstories" } + ListElement { name: "World"; feed: "rss.news.yahoo.com/rss/world" } + ListElement { name: "Oceania"; feed: "rss.news.yahoo.com/rss/oceania" } + ListElement { name: "U.S. National"; feed: "rss.news.yahoo.com/rss/us" } + ListElement { name: "Business"; feed: "rss.news.yahoo.com/rss/business" } + ListElement { name: "Technology"; feed: "rss.news.yahoo.com/rss/tech" } + ListElement { name: "Entertainment"; feed: "rss.news.yahoo.com/rss/entertainment" } + ListElement { name: "Sports"; feed: "sports.yahoo.com/mlb/teams/bos/rss.xml" } +} diff --git a/QtDemo/qml/QtDemo/demos/rssnews/content/ScrollBar.qml b/QtDemo/qml/QtDemo/demos/rssnews/content/ScrollBar.qml new file mode 100644 index 0000000..d3cf4a6 --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/content/ScrollBar.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id: container + + property variant scrollArea + property variant orientation: Qt.Vertical + + opacity: 0 + + function position() + { + var ny = 0; + if (container.orientation == Qt.Vertical) + ny = scrollArea.visibleArea.yPosition * container.height; + else + ny = scrollArea.visibleArea.xPosition * container.width; + if (ny > 2) return ny; else return 2; + } + + function size() + { + var nh, ny; + + if (container.orientation == Qt.Vertical) + nh = scrollArea.visibleArea.heightRatio * container.height; + else + nh = scrollArea.visibleArea.widthRatio * container.width; + + if (container.orientation == Qt.Vertical) + ny = scrollArea.visibleArea.yPosition * container.height; + else + ny = scrollArea.visibleArea.xPosition * container.width; + + if (ny > 3) { + var t; + if (container.orientation == Qt.Vertical) + t = Math.ceil(container.height - 3 - ny); + else + t = Math.ceil(container.width - 3 - ny); + if (nh > t) return t; else return nh; + } else return nh + ny; + } + + Rectangle { anchors.fill: parent; color: "Black"; opacity: 0.3 } + + BorderImage { + source: "images/scrollbar.png" + border { left: 1; right: 1; top: 1; bottom: 1 } + x: container.orientation == Qt.Vertical ? 2 : position() + width: container.orientation == Qt.Vertical ? container.width - 4 : size() + y: container.orientation == Qt.Vertical ? position() : 2 + height: container.orientation == Qt.Vertical ? size() : container.height - 4 + } + + states: State { + name: "visible" + when: container.orientation == Qt.Vertical ? scrollArea.movingVertically : scrollArea.movingHorizontally + PropertyChanges { target: container; opacity: 1.0 } + } + + transitions: Transition { + from: "visible"; to: "" + NumberAnimation { properties: "opacity"; duration: 600 } + } +} diff --git a/QtDemo/qml/QtDemo/demos/rssnews/content/images/busy.png b/QtDemo/qml/QtDemo/demos/rssnews/content/images/busy.png Binary files differnew file mode 100644 index 0000000..664c2b1 --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/content/images/busy.png diff --git a/QtDemo/qml/QtDemo/demos/rssnews/content/images/scrollbar.png b/QtDemo/qml/QtDemo/demos/rssnews/content/images/scrollbar.png Binary files differnew file mode 100644 index 0000000..0228dcf --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/content/images/scrollbar.png diff --git a/QtDemo/qml/QtDemo/demos/rssnews/rssnews.qml b/QtDemo/qml/QtDemo/demos/rssnews/rssnews.qml new file mode 100644 index 0000000..906577b --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/rssnews.qml @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the QtQml module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.XmlListModel 2.0 +import "content" + +Rectangle { + id: window + width: 688; height: 462 + + property int listWidth: 220 + property string currentFeed: "rss.news.yahoo.com/rss/topstories" + property bool loading: feedModel.status == XmlListModel.Loading + + RssFeeds { id: rssFeeds } + + XmlListModel { + id: feedModel + source: "http://" + window.currentFeed + query: "/rss/channel/item" + + XmlRole { name: "title"; query: "title/string()" } + XmlRole { name: "link"; query: "link/string()" } + XmlRole { name: "description"; query: "description/string()" } + } + + Row { + Rectangle { + width: window.listWidth; height: window.height + color: "#efefef" + + ListView { + focus: true + id: categories + anchors.fill: parent + model: rssFeeds + delegate: CategoryDelegate {} + highlight: Rectangle { color: "steelblue" } + highlightMoveVelocity: 9999999 + } + ScrollBar { + scrollArea: categories; height: categories.height; width: 8 + anchors.right: categories.right + } + } + ListView { + id: list + width: window.width - window.listWidth; height: window.height + model: feedModel + delegate: NewsDelegate {} + } + } + + ScrollBar { scrollArea: list; height: list.height; width: 8; anchors.right: window.right } + Rectangle { x: window.listWidth; height: window.height; width: 1; color: "#cccccc" } +} diff --git a/QtDemo/qml/QtDemo/demos/rssnews/rssnews.qmlproject b/QtDemo/qml/QtDemo/demos/rssnews/rssnews.qmlproject new file mode 100644 index 0000000..5becbda --- /dev/null +++ b/QtDemo/qml/QtDemo/demos/rssnews/rssnews.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.1 + +Project { + mainFile: "rssnews.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } +} diff --git a/QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml b/QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml index 9e1d9f1..949cf61 100644 --- a/QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml +++ b/QtDemo/qml/QtDemo/demos/slidepuzzle/slidepuzzle.qml @@ -161,7 +161,7 @@ Rectangle { var xNew = freeX; var yNew = freeY; - switch(num) + switch (num) { case 0: xNew = Math.max(0,freeX-1); break; //move left case 1: xNew = Math.min(2,freeX+1); break; //move right diff --git a/QtDemo/qml/QtDemo/engine.js b/QtDemo/qml/QtDemo/engine.js index ac80e0e..0a936f0 100644 --- a/QtDemo/qml/QtDemo/engine.js +++ b/QtDemo/qml/QtDemo/engine.js @@ -7,7 +7,7 @@ var positions = [{x:700, y:-400, angle: 0, borderColor: "blue", url: "demos/same {x: 300, y:-1000, angle: 0, borderColor: "orange", url: "demos/particledemo/particledemo.qml", device: 2}, {x: 200, y:1100, angle: -8, borderColor: "orange", url: "demos/slidepuzzle/slidepuzzle.qml", device: 3}, - {x: -1300, y:1100, angle: 3, borderColor: "orange", url: "demos/boot/BootScreen.qml", device: 2}, + {x: -1300, y:1100, angle: 3, borderColor: "orange", url: "demos/rssnews/rssnews.qml", device: 2}, {x: 1500, y:800, angle: -3, borderColor: "orange", url: "demos/boot/BootScreen.qml", device: 2}, {x: 1500, y:-1100, angle: -3, borderColor: "red", url: "demos/particledemo/particledemo.qml", device: 1}, {x: 2000, y: 0, angle: 5, borderColor: "red", url: "demos/photosurface/photosurface.qml", device: 1}, @@ -18,8 +18,6 @@ var positions = [{x:700, y:-400, angle: 0, borderColor: "blue", url: "demos/same var widths = [375, 838, 840, 867] var heights = [835, 589, 763, 520] var scales = [0.6, 1.4, 0.8, 2] -var maskWidths = [375, 900, 840, 867] -var maskHeights = [835, 661, 763, 520] var demoWidths = [321, 735, 688, 603] var demoHeights = [481, 460, 462, 378] var maskVerticalOffsets = [44, 37, 91, 51] @@ -59,8 +57,6 @@ function createNew(x,y,angle,borderColor,url,device){ object.width = widths[device] object.height = heights[device] object.scale = scales[device] - object.maskWidth = maskWidths[device] - object.maskHeight = maskHeights[device] object.demoWidth = demoWidths[device] object.demoHeight = demoHeights[device] object.maskVerticalOffset = maskVerticalOffsets[device] |