Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
535 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
document.body.style.cursor = "auto" | ||
|
||
slider = new SliderComponent | ||
width: 6 | ||
height: 200 | ||
min: 0, max: 50 | ||
value: 25 | ||
knobSize: 30 | ||
|
||
slider.center() | ||
slider.x += 75 | ||
|
||
val = new Layer | ||
backgroundColor: "transparent" | ||
clip: false | ||
|
||
val.style = { | ||
"font": "100 92px/1 Helvetica Neue" | ||
"color": "#333" | ||
"text-align": "center" | ||
} | ||
|
||
val.html = slider.value | ||
val.center() | ||
val.x -= 75 | ||
|
||
slider2 = new SliderComponent | ||
width: 200 | ||
height: 6 | ||
min: 0, max: 50 | ||
value: 25 | ||
knobSize: 30 | ||
|
||
slider2.center() | ||
slider2.y -= 150 | ||
slider2.x -= 50 | ||
|
||
slider.on "change:value", -> | ||
val.html = Math.round this.value | ||
slider2.value = this.value | ||
|
||
slider2.on "change:value", -> | ||
val.html = Math.round this.value | ||
slider.value = this.value |
12 changes: 12 additions & 0 deletions
12
test/studio/SliderComponentVertical.framer/framer/coffee-script.js
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
test/studio/SliderComponentVertical.framer/framer/config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"device" : "iPhone 5S Space Gray", | ||
"sharedPrototype" : 1, | ||
"deviceOrientation" : 0, | ||
"contentScale" : 1, | ||
"deviceType" : "fullscreen", | ||
"updateDelay" : 0.3, | ||
"deviceScale" : -1, | ||
"delay" : 0.3 | ||
} |
126 changes: 126 additions & 0 deletions
126
test/studio/SliderComponentVertical.framer/framer/framer.init.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
(function() { | ||
|
||
function isFileLoadingAllowed() { | ||
return (window.location.protocol.indexOf("file") == -1) | ||
} | ||
|
||
function isHomeScreened() { | ||
return ("standalone" in window.navigator) && window.navigator.standalone == true | ||
} | ||
|
||
function isCompatibleBrowser() { | ||
return Utils.isWebKit() | ||
} | ||
|
||
var alertNode; | ||
|
||
function dismissAlert() { | ||
alertNode.parentElement.removeChild(alertNode) | ||
loadProject() | ||
} | ||
|
||
function showAlert(html) { | ||
|
||
alertNode = document.createElement("div") | ||
|
||
alertNode.classList.add("framerAlertBackground") | ||
alertNode.innerHTML = html | ||
|
||
document.addEventListener("DOMContentLoaded", function(event) { | ||
document.body.appendChild(alertNode) | ||
}) | ||
|
||
window.dismissAlert = dismissAlert; | ||
} | ||
|
||
function showBrowserAlert() { | ||
var html = "" | ||
html += "<div class='framerAlert'>" | ||
html += "<strong>Error: Not A WebKit Browser</strong>" | ||
html += "Your browser is not supported. <br> Please use Safari or Chrome.<br>" | ||
html += "<a class='btn' href='javascript:void(0)' onclick='dismissAlert();'>Try anyway</a>" | ||
html += "</div>" | ||
|
||
showAlert(html) | ||
} | ||
|
||
function showFileLoadingAlert() { | ||
var html = "" | ||
html += "<div class='framerAlert'>" | ||
html += "<strong>Error: Local File Restrictions</strong>" | ||
html += "Preview this prototype with Framer Mirror or learn more about " | ||
html += "<a href='https://github.com/koenbok/Framer/wiki/LocalLoading'>file restrictions</a>.<br>" | ||
html += "<a class='btn' href='javascript:void(0)' onclick='dismissAlert();'>Try anyway</a>" | ||
html += "</div>" | ||
|
||
showAlert(html) | ||
} | ||
|
||
function showHomeScreenAlert() { | ||
|
||
link = document.createElement("link"); | ||
link.href = "framer/mirror.css" | ||
link.type = "text/css" | ||
link.rel = "stylesheet" | ||
link.media = "screen" | ||
|
||
document.addEventListener("DOMContentLoaded", function(event) { | ||
document.getElementsByTagName("head")[0].appendChild(link) | ||
}) | ||
|
||
var html = "" | ||
html += "<figure class='icon-close' href='javascript:void(0)' onclick='dismissAlert();'></figure>" | ||
html += "<section class='wrapper'>" | ||
html += "<figure class='icon-framer'></figure><h1>Install Prototype</h1>" | ||
html += "<p>Tap <div class='share'><figure class='icon-share'></figure> Share</div>, then choose 'Add to Home Screen'</p> " | ||
html += "<section class='arrow'><figure class='icon-arrow'></figure></section>" | ||
html += "</section>" | ||
|
||
showAlert(html) | ||
} | ||
|
||
function loadProject() { | ||
CoffeeScript.load("app.coffee") | ||
} | ||
|
||
function setDefaultPageTitle() { | ||
// If no title was set we set it to the project folder name so | ||
// you get a nice name on iOS if you bookmark to desktop. | ||
document.addEventListener("DOMContentLoaded", function() { | ||
if (document.title == "") { | ||
if (window.FramerStudioInfo && window.FramerStudioInfo.documentTitle) { | ||
document.title = window.FramerStudioInfo.documentTitle | ||
} else { | ||
document.title = window.location.pathname.replace(/\//g, "") | ||
} | ||
} | ||
}) | ||
} | ||
|
||
function init() { | ||
|
||
if (Utils.isFramerStudio()) { | ||
return | ||
} | ||
|
||
setDefaultPageTitle() | ||
|
||
if (!isCompatibleBrowser()) { | ||
return showBrowserAlert() | ||
} | ||
|
||
if (!isFileLoadingAllowed()) { | ||
return showFileLoadingAlert() | ||
} | ||
|
||
// if (Utils.isMobile() && !isHomeScreened()) { | ||
// return showHomeScreenAlert() | ||
// } | ||
|
||
loadProject() | ||
|
||
} | ||
|
||
init() | ||
|
||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../build/framer.debug.js |
Binary file added
BIN
+125 Bytes
test/studio/SliderComponentVertical.framer/framer/images/background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.1 KB
test/studio/SliderComponentVertical.framer/framer/images/cursor@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.69 KB
test/studio/SliderComponentVertical.framer/framer/images/icon-120.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.71 KB
test/studio/SliderComponentVertical.framer/framer/images/icon-152.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+364 Bytes
test/studio/SliderComponentVertical.framer/framer/images/icon-arrow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+684 Bytes
test/studio/SliderComponentVertical.framer/framer/images/icon-arrow@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+272 Bytes
test/studio/SliderComponentVertical.framer/framer/images/icon-close.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+448 Bytes
test/studio/SliderComponentVertical.framer/framer/images/icon-close@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.09 KB
test/studio/SliderComponentVertical.framer/framer/images/icon-framer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.7 KB
test/studio/SliderComponentVertical.framer/framer/images/icon-framer@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+196 Bytes
test/studio/SliderComponentVertical.framer/framer/images/icon-share.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+325 Bytes
test/studio/SliderComponentVertical.framer/framer/images/icon-share@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.