
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
cesium-dnd makes Cesium entities draggable with less code. [Demo](https://reearth.github.io/cesium-dnd/)
cesium-dnd makes Cesium entities draggable with less code. Demo
To install:
npm install cesium cesium-dnd
# or
yarn add cesium cesium-dnd
Or
<script src="https://unpkg.com/cesium-dnd@latest/dist/cesium-dnd.umd.js"></script>
<script>
const viewer = new Cesium.Viewer("cesiumContainer");
new CesiumDnD(viewer);
</script>
// Init cesium-dnd
const viewer = new Cesium.Viewer("cesiumContainer");
const cesiumDnD = new CesiumDnD(viewer, { // CesiumWidget is also acceptable
initialDisabled: false,
onDrag: (entity, position, context) => {
// ...
},
onDragging: (entity, position, context) => {
// ...
},
onDrop: (entity, position, context) => {
// ...
}
});
// Disable drag and drop
cesiumDnD.disable();
// Enable drag and drop
cesiumDnD.enable();
type Context = {
position?: Cartesian3;
screenPosition: Cartesian2;
initialPosition?: PositionProperty;
initialScreenPosition: Cartesian2;
};
type Position = {
/** Degrees */
lat: number;
/** Degrees */
lng: number;
/** Meters */
height: number;
};
type Options = {
/** If true, prevent dnd to be automatically enabled. */
initialDisabled?: boolean;
/** If false is returned, dragging will not start. */
onDrag?: (e: Entity, position: Position | undefined, context: Context) => void | boolean;
/**
* If undefined is returned, new position will be automatically set to the entity. (default)
* If false is returned, new position will not be set to the entity.
* Otherwise, the return value will be set as new position to the entity.
*/
onDragging?: (
e: Entity,
position: Position | undefined,
context: Context & { previousScreenPosition: Cartesian2 },
) => void | false | Cartesian3;
/**
* If false is returned, new position will not be set to the entity and position of the entity will be reverted.
* Otherwise, new position will be automatically set to the entity.
*/
onDrop?: (e: Entity, position: Position | undefined, context: Context) => void | boolean;
};
FAQs
cesium-dnd makes Cesium entities draggable with less code. [Demo](https://reearth.github.io/cesium-dnd/)
The npm package cesium-dnd receives a total of 21 weekly downloads. As such, cesium-dnd popularity was classified as not popular.
We found that cesium-dnd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.