浏览代码

revert joystick changes

Falko Schindler 2 年之前
父节点
当前提交
53b8685522
共有 2 个文件被更改,包括 1 次插入2 次删除
  1. 1 1
      nicegui/elements/joystick.js
  2. 0 1
      nicegui/elements/joystick.py

+ 1 - 1
nicegui/elements/joystick.js

@@ -1,6 +1,6 @@
 Vue.component("joystick", {
   template: `
-    <div data-nicegui='joystick' v-bind:id="jp_props.id" :class="jp_props.classes" :style="jp_props.style"></div>
+    <div v-bind:id="jp_props.id" style="background-color:AliceBlue;position:relative;width:10em;height:10em" :style="jp_props.style"></div>
     `,
   mounted() {
     const joystick = nipplejs.create({

+ 0 - 1
nicegui/elements/joystick.py

@@ -19,7 +19,6 @@ class JoystickView(CustomView):
         self.on_start = on_start
         self.on_move = on_move
         self.on_end = on_end
-        self.style = 'position:relative;'
         self.allowed_events = ['onStart', 'onMove', 'onEnd']
         self.initialize(temp=False,
                         onStart=self.handle_start,