目录
当前位置: 首页 > 文档资料 > Snap.svg 英文文档 >

Paper.g([varargs])

优质
小牛编辑
139浏览
2023-12-01

Creates a group element

Parameters

  1. varargs…elements to nest within the group

Returns: object the g element

Usage

var c1 = paper.circle(),
c2 = paper.rect(),
g = paper.g(c2, c1); // note that the order of elements is different

or

var c1 = paper.circle(),
c2 = paper.rect(),
g = paper.g();
g.add(c2, c1);