Permalink
Browse files

fix origin crosshair position

  • Loading branch information...
1 parent 87c433d commit 49840cb571d879608eff48698b8772195b6d7e88 @zrispo committed Aug 6, 2016
Showing with 4 additions and 26 deletions.
  1. +1 −0 .gitignore
  2. +0 −20 In this decade, the Internet has slowly become ver
  3. +1 −1 editor.htm
  4. +2 −5 src/editor/interfaces/fabricinterface.js
View
@@ -0,0 +1 @@
+.DS_Store
@@ -1,20 +0,0 @@
-In this decade, the Internet has slowly become very rigid and impenetrable. Contrary to what might be expected, the kinds of content widely available through web browsers has not been increasing: almost all of our browsing is still comprised of videos and static text and images. Creating custom interactive websites and web games has surprisingly become more challenging in recent years, despite the best efforts of learn to code sites such as Codecademy.
-
-
-Wick is a free and open source web programming and design environment which allows users to create easily sharable games, animations, and interactive web pages which work on all major browsers and operating systems. The underlying technologies of Wick are all open web technologies (JavaScript, HTML5, WebGL, etc). Our goal is to allow people who are not web development experts to use these new, rich web technologies while not being forced to use any proprietary editors or players. Visit us at github.com/zrispo/wick!
-
-
-
-Our goal is to allow people who are not web development experts to gain access to these new, rich web technologies. Visit us at github.com/zrispo/wick!
-
-
-
-
-
-Our session will be a workshop on getting started with Wick by creating a small interactive webpage or game and publishing it to the web using GitHub.
-
-
-
-
-
-With a smaller group of participants, we will work closely with the few visitors to create a project and discuss . With a larger group, we may run the session more similarly to a classroom where we demonstrate how to use Wick and visitors individually create smaller projects during the demos.
View
@@ -41,7 +41,7 @@
<script>
$(document).ready(function() {
- var wickEditor = new WickEditor();
+ window.wickEditor = new WickEditor();
});
</script>
</head>
@@ -159,16 +159,13 @@ var FabricInterface = function (wickEditor) {
this.frameInside.top = (window.innerHeight-projectHeight)/2 + wickEditor.panPosition.y;
this.frameInside.setCoords();
- var currentObjectLeft = wickEditor.project.getCurrentObject().left;
- var currentObjectTop = wickEditor.project.getCurrentObject().top;
-
// Move the origin crosshair to the current origin
if(this.originCrosshair) { // window resize can happen before originCrosshair's image is loaded
this.originCrosshair.left = (window.innerWidth -projectWidth) /2 - this.originCrosshair.width/2;
this.originCrosshair.top = (window.innerHeight-projectHeight)/2 - this.originCrosshair.height/2;
- this.originCrosshair.left += currentObjectLeft;
- this.originCrosshair.top += currentObjectTop;
+ this.originCrosshair.left += wickEditor.project.getCurrentObject().x;
+ this.originCrosshair.top += wickEditor.project.getCurrentObject().y;
this.originCrosshair.left += wickEditor.panPosition.x;
this.originCrosshair.top += wickEditor.panPosition.y;

0 comments on commit 49840cb

Please sign in to comment.