Coder Social home page Coder Social logo

ipymafs's Introduction

๐Ÿ‘‹ย Hi, I am Hendrik and I am building tools in the python visualization ecosystems.

ipymafs's People

Contributors

kolibril13 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

ipymafs's Issues

Interactive elements do not work

When going to the https://code.esm.sh/ playground, static mafs components load just fine:

Copy pasting this css content https://unpkg.com/[email protected]/core.css
and this react code (based on https://mafs.dev/guides/display/lines)

import React from "https://esm.sh/react"
import { Mafs, Line, Coordinates, useMovablePoint } from "https://esm.sh/mafs"

export default function SimplePoint() {
  const point1 = useMovablePoint([-2, -1])
  const point2 = useMovablePoint([2, 1])

  return (
    <Mafs viewBox={{ x: [-2, 2], y: [-1, 1] }}>
      <Coordinates.Cartesian />
      <Line.Segment
        point1={point1.point}
        point2={point2.point}
      />
    </Mafs>
  )
}

works fine!

However, when I add {point1.element} to the react component like this:

<Mafs viewBox={{ x: [-2, 2], y: [-1, 1] }}>
      <Coordinates.Cartesian />
      <Line.Segment
        point1={point1.point}
        point2={point2.point}
      />
    {point1.element}
    </Mafs>

I get the error:

[Error] TypeError: Object.entries requires that input parameter not be null or undefined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.