Permalink
Browse files

fix for duplicate subviews on copy

  • Loading branch information...
koenbok committed Apr 26, 2014
1 parent 68e7cd4 commit e175596131fd7dca541b91bb7dcc8b0fb32072d3
Showing with 10 additions and 12 deletions.
  1. +3 −9 build/framer.js
  2. +4 −0 extras/CactusFramerTest/static/app-cs.coffee
  3. +3 −3 src/views/view.coffee
@@ -1,7 +1,7 @@
// Framer 2.0-64-gfad01d1 (c) 2013 Koen Bok
// Framer 2.0-66-g68e7cd4 (c) 2013 Koen Bok
// https://github.com/koenbok/Framer
window.FramerVersion = "2.0-64-gfad01d1";
window.FramerVersion = "2.0-66-g68e7cd4";
(function(){var require = function (file, cwd) {
@@ -3079,14 +3079,8 @@ require.define("/src/views/view.coffee",function(require,module,exports,__dirnam
});
View.prototype.copy = function() {
var copiedSubView, subView, view, _i, _len, _ref;
var view;
view = new this.constructor(this.properties);
_ref = this.subViews;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
subView = _ref[_i];
copiedSubView = subView.copy();
copiedSubView.superView = view;
}
return view;
};
@@ -1,2 +1,6 @@
viewA = new ScrollView x:20, y:20, width:100, height:100
viewB = new View x:20, y:20, width:100, height:100, superView:viewA
viewC = viewA.copy()
viewC.y = 200
@@ -517,9 +517,9 @@ class View extends Frame
view = new @constructor @properties
for subView in @subViews
copiedSubView = subView.copy()
copiedSubView.superView = view
# for subView in @subViews
# copiedSubView = subView.copy()
# copiedSubView.superView = view
view

0 comments on commit e175596

Please sign in to comment.