Permalink
Browse files

Fix performance tests

  • Loading branch information...
Koen Bok
Koen Bok committed Apr 9, 2016
1 parent c849544 commit 320b6dcc9b30c4e6d88846dba9cbb166637da7c2
View
@@ -42,7 +42,7 @@ coverage: bootstrap
studio:
open -a "Framer Studio" extras/Studio.framer
perf:
perf: debug
open -a "Framer Studio" extras/Perf.framer
# Building and uploading the site
@@ -1 +1 @@
2
999
@@ -133,6 +133,8 @@ drawChart = (stats) ->
options = {}
lineChart = new Chart(canvasElement.getContext("2d")).Line(data, options);
lineChart = new Chart(canvasElement.getContext("2d")).Line(data, options)
print Framer.Version
@@ -1,10 +1,12 @@
{
"device" : "iPhone 5S Space Gray",
"sharedPrototype" : 1,
"deviceOrientation" : 0,
"sharedPrototype" : 1,
"contentScale" : 1,
"deviceType" : "iphone-6-silver",
"deviceType" : "fullscreen",
"selectedHand" : "",
"updateDelay" : 0.3,
"deviceScale" : -1,
"delay" : 0.3
"deviceScale" : 1,
"delay" : 0.3,
"orientation" : 0
}
@@ -1,10 +1,11 @@
// This is autogenerated by Framer Studio
if (!window.Framer) {window._bridge('runtime.error', {message:'[framer.js] Framer library missing or corrupt. Select File → Update Framer.'})}
if (typeof(DeviceComponent) !== "undefined") {DeviceComponent.Devices["iphone-6-silver"].deviceImageJP2 = false};
window.Framer.Defaults.DeviceView = {"deviceScale":-1,"deviceType":"fullscreen","contentScale":1,"orientation":0};
window.Framer.Defaults.DeviceView = {"deviceScale":1,"selectedHand":"","deviceType":"fullscreen","contentScale":1,"orientation":0};
window.Framer.Defaults.DeviceComponent = {"deviceScale":-1,"deviceType":"fullscreen","contentScale":1,"orientation":0};
window.Framer.Defaults.DeviceComponent = {"deviceScale":1,"selectedHand":"","deviceType":"fullscreen","contentScale":1,"orientation":0};
window.FramerStudioInfo = {"deviceImagesUrl":"\/_server\/resources\/DeviceImages","documentTitle":"Perf.framer"};
@@ -392,7 +393,7 @@ var ANIMATING_KEYS, CONFIG, canvasScaleX, canvasScaleY, highlightColor, scaledFr
highlightColor = "#28AFFA";
ANIMATING_KEYS = ["x", "y", "width", "height", "scaleX", "scaleY", "scaleZ", "scale"];
ANIMATING_KEYS = ["x", "y", "width", "height", "scaleX", "scaleY", "scaleZ", "scale", "rotation", "rotationX", "rotationY", "rotationZ", "skew", "skewX", "skewY"];
CONFIG = {
borderWidth: 2
@@ -526,22 +527,28 @@ exports.HighlightComponent = (function() {
};
HighlightComponent.prototype.update = function() {
var canvasFrame, currentFrame, infoOnTopOrBottom, margin, midXPos, midYPos, ref, yPos;
var canvasFrame, currentFrame, infoOnTopOrBottom, margin, midXPos, midYPos, ref, screenFrame, yPos;
if (!this.layer) {
return;
}
if (!this.current) {
return;
}
currentFrame = screenScaledFrame(this.current);
if (Utils.boundingFrame) {
currentFrame = Utils.boundingFrame(this.current, true);
screenFrame = Utils.boundingFrame(this.current, false);
this.info.textElement.textContent = "x: " + (screenFrame.x.toFixed(1)) + ", y: " + (screenFrame.y.toFixed(1)) + ", width: " + (screenFrame.width.toFixed(1)) + ", height: " + (screenFrame.height.toFixed(1));
} else {
currentFrame = screenScaledFrame(this.current);
this.layer.rotation = this.current.rotation;
this.info.textElement.textContent = "x: " + (this.current.x.toFixed(1)) + ", y: " + (this.current.y.toFixed(1)) + ", width: " + (this.current.width.toFixed(1)) + ", height: " + (this.current.height.toFixed(1));
}
currentFrame.x -= CONFIG.borderWidth;
currentFrame.y -= CONFIG.borderWidth;
currentFrame.width += 2 * CONFIG.borderWidth;
currentFrame.height += 2 * CONFIG.borderWidth;
this.layer.visible = true;
this.layer.frame = currentFrame;
this.layer.rotation = this.current.rotation;
this.info.textElement.textContent = "x: " + (this.current.x.toFixed(1)) + ", y: " + (this.current.y.toFixed(1)) + ", width: " + (this.current.width.toFixed(1)) + ", height: " + (this.current.height.toFixed(1));
canvasFrame = (ref = Framer.Canvas) != null ? ref.frame : void 0;
if (!canvasFrame) {
canvasFrame = {
@@ -641,6 +648,12 @@ Runtime = (function(superClass) {
return bridge.send("device:change");
});
});
Framer.Device.on("change:phoneScale", function(phoneScale) {
return bridge.send("change:phoneScale", {
phoneScale: phoneScale
});
});
Framer.Device._calculatePhoneScale();
}
bridge.send("runtime.init");
return this._errorHandlerSetup();
@@ -1 +1 @@
1
2

0 comments on commit 320b6dc

Please sign in to comment.