Giter VIP home page Giter VIP logo

cefpanda's People

Contributors

el-dee avatar leandro-benedet-garcia avatar moguri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cefpanda's Issues

"exec_js_func" does not behave as expected

The current version of "exec_js_func" reads:

    def exec_js_func(self, js_func, *args, onload=True):
        if onload and not self._is_loaded:
            self._js_func_onload_queue.append((js_func, args))
        else:
            self.browser.GetMainFrame().ExecuteJavascript(js_func, *args)

Unless I misunderstand how it is intended to work, the last line should probably read...

self.browser.GetMainFrame().ExecuteFunction(js_func, *args)

... instead. Either way, "exec_js_func" currently does not behave as expected.

Browser doesn't re-size if window's horizontal size changes

As the title says: if one resizes the Panda3D window horizontally, the CEF browser simply stretches along instead of re-sizing to the new resolution.

I've currently fixed this by changing...

if self._cef_texture.get_x_size() != width AND self._cef_texture.get_y_size() != height:

to

if self._cef_texture.get_x_size() != width OR self._cef_texture.get_y_size() != height:

... in CEFPanda._set_browser_size, on my local version of cefpanda.
I considered posting this as a pull request, but since I don't know for sure how you intended that method to operate, I'll leave it to you.

Relative paths for .load_file()

.load_file() seems to take only take paths relative to the working directory. That forces running them from the source directory. Paths should (also) be relative to the module source file that makes the call, or the module directory.

Cannot run examples on macOS 10.15 "Illegal instruction: 4"

I tried running the examples (using the pip release of cefpanda) on macOS 10.15 and I am getting the error "Illegal instruction: 4". I made a minimal script with just cefpython and panda3d and found the following weirdness:

If you initialize cefpython before panda3d, then panda3d only gets mouse move events when the mouse buttons are held down. If you initialize cefpython after panda3d, then you get the illegal instruction error when running cefpanda.MessageLoopWork().

Here's the minimal example with cefpython being initialized before panda3d:

from cefpython3 import cefpython

from direct.showbase.ShowBase import ShowBase
from direct.task import Task


class MyApp(ShowBase):
    def __init__(self):
        super().__init__()
        self.disableMouse()

        self.updateTask = self.taskMgr.add(self.updateTask, 'updateTask')

    def updateTask(self, task):
        if self.mouseWatcherNode.hasMouse():
            x = self.mouseWatcherNode.getMouseX()
            y = self.mouseWatcherNode.getMouseY()
            print(self.mouseWatcherNode, x, y)
        cefpython.MessageLoopWork()
        return Task.cont


def main():
    settings = {
        "windowless_rendering_enabled": True,
    }

    switches = {
        "disable-gpu": "",
        "disable-gpu-compositing": "",
        "enable-begin-frame-scheduling": "",
    }

    cefpython.Initialize(settings=settings, switches=switches)
    app = MyApp()
    app.run()
    cefpython.Shutdown()


if __name__ == '__main__':
    main()

:active CSS pseudo class support

Hi,

First, thank you for this project, it is fun and easy to use!

Second, I am trying to implement buttons with a special effect on :hover and :active. The :hover works fine, but :active does not work. I was wondering if it was technically possible and if you are interested, I could try forking and sending a pull request.

No README.md file

It would be helpful if there were a readme file that contained information about how to install cefpanda, and contained some basic documentation or links to the example code.

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.