示例#1
0
// Path returns a new PathObserver instance
func Path(ps PathSequencer) *PathObserver {
	if ps == nil {
		ps = HashSequencer
	}
	return &PathObserver{
		Publisher: pub.Identity(),
		sequencer: ps,
	}
}
示例#2
0
// Sequence returns a new sequence renderer instance.
func Sequence(meta SequenceMeta, r ...Renderable) *SequenceRenderer {
	if meta.Tag == "" {
		meta.Tag = "div"
	}

	s := SequenceRenderer{
		Publisher:    pub.Identity(),
		SequenceMeta: &meta,
	}

	s.Add(r...)

	return &s
}