|
Last change
on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago |
|
Prototype 1.1
|
-
Property mode
set to
100644
|
|
File size:
798 bytes
|
| Line | |
|---|
| 1 | import sparse from "./sparse.js";
|
|---|
| 2 | import {Selection} from "./index.js";
|
|---|
| 3 |
|
|---|
| 4 | export default function() {
|
|---|
| 5 | return new Selection(this._enter || this._groups.map(sparse), this._parents);
|
|---|
| 6 | }
|
|---|
| 7 |
|
|---|
| 8 | export function EnterNode(parent, datum) {
|
|---|
| 9 | this.ownerDocument = parent.ownerDocument;
|
|---|
| 10 | this.namespaceURI = parent.namespaceURI;
|
|---|
| 11 | this._next = null;
|
|---|
| 12 | this._parent = parent;
|
|---|
| 13 | this.__data__ = datum;
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | EnterNode.prototype = {
|
|---|
| 17 | constructor: EnterNode,
|
|---|
| 18 | appendChild: function(child) { return this._parent.insertBefore(child, this._next); },
|
|---|
| 19 | insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },
|
|---|
| 20 | querySelector: function(selector) { return this._parent.querySelector(selector); },
|
|---|
| 21 | querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }
|
|---|
| 22 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.