Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cat Annotation - issue with lightning-image-poly package #19

Open
arishuynhvan opened this issue Aug 16, 2016 · 2 comments
Open

Cat Annotation - issue with lightning-image-poly package #19

arishuynhvan opened this issue Aug 16, 2016 · 2 comments

Comments

@arishuynhvan
Copy link

Hi kind contributors

Thank you for the easy to follow guide to setting up electron app. Everything worked fine for me in this course except for the bug with the polygon drawing package

I could kinda draw squiggly lines after following the tutorial, but my doodling disappeared the moment I release my mouse. Also, my browser buffer size increase as if there were more elements added to it, which I think is what the code below was trying to do:

var viz = new image('#visualization',null,[src],{hullAlgorithm:'convex'});

Because there was a code that was supposed to delete the original image and re-render it, the new image was taking super long to render while the old image was not deleted either. And the drawing didn't seem to be at the right location.

Please kindly help explain what was going on.

My entire code was:

var picture=require('cat-picture');
var image=require("lightning-image-poly");

var src=picture.src;
picture.remove();
var viz = new image('#visualization',null,[src],{hullAlgorithm:'convex'});

Thank you

@available300
Copy link

I have the same problem!!
Although I type elementary electron verify then it appear success,
but I am not able to draw polygons on it .
why??
this is my entire code :

#index.html

 <html>
 <head>
 </head>
 <body>
   <h1>Hello World</h1>
   <div id='visualization'></div>
   <script type="text/javascript" src="index.js"></script>
 </body>
 </html>

#app.js

var electron = require('electron')

electron.app.on('ready', function () {
  var mainWindow = new electron.BrowserWindow({width: 600, height: 800})
  mainWindow.loadURL('file://' + __dirname + '/index.html')
})

#index.js

require('cat-picture')
var picture = require('cat-picture')
var src = picture.src
pirture.remove()
var image = require('lightning-image-poly')
var viz = new image('#visualization',null,[src],{hullAlgorithm:'convex'});

#package.json

{
"name": "elementary-electron",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"cat-picture": "^5.1.2",
"lightning-image-poly": "0.0.10"
}
}

please help me , thanks a lot!!!

@aquino1997
Copy link

Hello friends, I have this problem with the command installation: npm install lightning-image-poly --save

It's wrong:
C:\Users\josez\Desktop\Elementary Electron>npm install lightning-image-poly --save
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent An unknown git error occurred
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\josez\AppData\Local\npm-cache_logs\2021-09-01T17_33_32_674Z-debug.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants