Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Adding selected clones to a group
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Geo  
View profile  
 More options May 10 2012, 11:21 am
From: Geo <gravypl...@gmail.com>
Date: Thu, 10 May 2012 08:21:26 -0700
Local: Thurs, May 10 2012 11:21 am
Subject: Re: Adding selected clones to a group
I try but I cant link directly tto the all.js file for inclusion into
jsfiddle. Can you give me the direct link to the file so i can add it
as an external js file in jsfiddle please. I try
https://github.com/kangax/fabric.js/blob/group_rewrite/dist/all.js but
it dosent respond with js it responds with the git html page.

On Thu 10 May 2012 12:40:00 AM PDT, Juriy Zaytsev wrote:

> Interesting. Can you make a simple jsfiddle test that shows this
> problem? Would be much easier to see what's going on.

> --
> kangax

> On Thu, May 10, 2012 at 8:39 AM, Geo <gravypl...@gmail.com
> <mailto:gravypl...@gmail.com>> wrote:

>     I switched to it.
>     Tried the demo in the wiki for working with groups. everything
>     still worked except for the very last part, creating a group with
>     items already existing on the canvas. I copied exactly what you
>     have and I got the following error.
>     ----START
>     TypeError: callback is not a function

>     callback(new fabric.Group(enlivenedObjects, object));

>     all.js (line 10843)
>     ----END

>     I hope we can get this working because its the most important part
>     of what I would like to do. Being able to drag and drop objects
>     into a group.
>     So far I figure I would add an empty group to the canvas and then
>     any cloned object dropped inside that group becomes part of that
>     group. But each item should still be individually selectable, as
>     to get that items properties.

>     _geo

>     On Tue 08 May 2012 11:18:14 AM PDT, Juriy Zaytsev wrote:

>         There's a branch "group_rewrite" on github. Switch to it, then
>         copy
>         source of dist/all.js

>         Sent from my iPhone

>         On May 8, 2012, at 22:12, Geovanni <gravypl...@gmail.com
>         <mailto:gravypl...@gmail.com>
>         <mailto:gravypl...@gmail.com <mailto:gravypl...@gmail.com>>>
>         wrote:

>             I dont think so. how do I get that version?
>             _____________________________________________________________________
>             _ _ _ _ _ _ .
>             (_)(-(_)\/(_|| )| )|
>             _/

>             On Tue, May 8, 2012 at 11:09 AM, Juriy Zaytsev
>             <kan...@gmail.com <mailto:kan...@gmail.com>
>             <mailto:kan...@gmail.com <mailto:kan...@gmail.com>>> wrote:

>                Are you using experimental group_rewrite branch?

>                --
>                kangax

>                On Thu, Apr 26, 2012 at 9:25 AM, Geo
>             <gravypl...@gmail.com <mailto:gravypl...@gmail.com>
>             <mailto:gravypl...@gmail.com
>             <mailto:gravypl...@gmail.com>>> wrote:

>                    On my page I have a line of image objects on top
>             and when i
>                    click them i can successfully clone the object and
>             place the
>                    clone on the canvas.

>                    var cp = fabric.util.object.clone(__activeObject);
>                    canvas.add(cp);

>                    I can create an empty group

>                            var group = new fabric.Group([], { left:
>             300, top:
>                            300 });

>                            canvas.add(group);

>                    I would like to be able to drag-hold-select more
>             than one
>                    object and add it to a new group. So I grab the
>             group of
>                    objects when they are selected and add them to a group.

>                            canvas.observe('selection:__created',
>             function(){

>                                if (canvas.getActiveGroup()) {

>              canvas.getActiveGroup().__forEachObject(function(a) {

>                                group.add(a);

>                                });

>                                }

>                            });

>                    The problem I am having is rendering this new group.
>                    1. A "clone" of the group appears to the far upper
>             left of
>                    the canvas and is selectable. Selecting this starts
>             redrawing
>                    the canvas on top of itself then crashes the browser.
>                    2. If I deselect this newly created group, by clicking
>                    elsewhere on the canvas, I am unable to select the
>             group
>                    again by clicking one of the items in the group.

>                    If I have 4 items in a group how do I "lock" those
>             items in
>                    the group so that when I select an item in the
>             group the
>                    whole group gets selected and all the items move in
>             unison
>                    like the when it was newly created?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.