Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@d3fc/d3fc-pointer

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@d3fc/d3fc-pointer - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

18

build/d3fc-pointer.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dispatch'), require('d3-selection'), require('@d3fc/d3fc-rebind')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-dispatch', 'd3-selection', '@d3fc/d3fc-rebind'], factory) :
(global = global || self, factory(global.fc = global.fc || {}, global.d3, global.d3, global.fc));
}(this, function (exports, d3Dispatch, d3Selection, d3fcRebind) { 'use strict';
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fc = global.fc || {}, global.d3, global.d3, global.fc));
}(this, (function (exports, d3Dispatch, d3Selection, d3fcRebind) { 'use strict';
var pointer = (function () {
var event = d3Dispatch.dispatch('point');
var pointEvent = d3Dispatch.dispatch('point');
function mousemove() {
var point = d3Selection.mouse(this);
event.call('point', this, [{
function mousemove(event) {
var point = d3Selection.pointer(event);
pointEvent.call('point', this, [{
x: point[0],

@@ -19,3 +19,3 @@ y: point[1]

function mouseleave() {
void event.call('point', this, []);
void pointEvent.call('point', this, []);
}

@@ -27,3 +27,3 @@

d3fcRebind.rebind(instance, event, 'on');
d3fcRebind.rebind(instance, pointEvent, 'on');
return instance;

@@ -36,2 +36,2 @@ });

}));
})));

@@ -1,1 +0,1 @@

(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("d3-dispatch"),require("d3-selection"),require("@d3fc/d3fc-rebind")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-selection","@d3fc/d3fc-rebind"],b):(a=a||self,b(a.fc=a.fc||{},a.d3,a.d3,a.fc))})(this,function(a,b,c,d){'use strict';a.pointer=function(){function a(){var a=c.mouse(this);f.call("point",this,[{x:a[0],y:a[1]}])}function e(){void f.call("point",this,[])}var f=b.dispatch("point"),g=function(b){b.on("mouseenter.pointer",a).on("mousemove.pointer",a).on("mouseleave.pointer",e)};return d.rebind(g,f,"on"),g},Object.defineProperty(a,"__esModule",{value:!0})});
(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?b(exports,require("d3-dispatch"),require("d3-selection"),require("@d3fc/d3fc-rebind")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-selection","@d3fc/d3fc-rebind"],b):(a="undefined"==typeof globalThis?a||self:globalThis,b(a.fc=a.fc||{},a.d3,a.d3,a.fc))})(this,function(a,b,c,d){'use strict';a.pointer=function(){function a(a){var b=c.pointer(a);f.call("point",this,[{x:b[0],y:b[1]}])}function e(){void f.call("point",this,[])}var f=b.dispatch("point"),g=function(b){b.on("mouseenter.pointer",a).on("mousemove.pointer",a).on("mouseleave.pointer",e)};return d.rebind(g,f,"on"),g},Object.defineProperty(a,"__esModule",{value:!0})});

@@ -6,2 +6,13 @@ # Change Log

## [3.0.2](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-pointer@3.0.1...@d3fc/d3fc-pointer@3.0.2) (2020-09-23)
### Bug Fixes
* d3v6 pointer changes ([3776d80](https://github.com/d3fc/d3fc/commit/3776d80))
## 3.0.1 (2020-07-14)

@@ -8,0 +19,0 @@

{
"name": "@d3fc/d3fc-pointer",
"version": "3.0.1",
"version": "3.0.2",
"description": "Component which emits the current mouse or touch position over a selection",

@@ -35,3 +35,3 @@ "main": "build/d3fc-pointer.js",

},
"gitHead": "3c6890b82dbb430bafd52420c0dd506861f16f5d"
"gitHead": "a7f1db4d1fd44f696c7ead067284851953c18e6c"
}
import { dispatch } from 'd3-dispatch';
import { mouse } from 'd3-selection';
import { pointer } from 'd3-selection';
import { rebind } from '@d3fc/d3fc-rebind';
export default () => {
const event = dispatch('point');
const pointEvent = dispatch('point');
function mousemove() {
const point = mouse(this);
event.call('point', this, [{ x: point[0], y: point[1] }]);
function mousemove(event) {
const point = pointer(event);
pointEvent.call('point', this, [{ x: point[0], y: point[1] }]);
}
function mouseleave() {
void event.call('point', this, []);
void pointEvent.call('point', this, []);
}

@@ -24,5 +24,5 @@

rebind(instance, event, 'on');
rebind(instance, pointEvent, 'on');
return instance;
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc