Giter Site home page Giter Site logo

Comments (7)

websanova avatar websanova commented on August 15, 2024

Do you have all the libraries included for jquery ui?
On Oct 19, 2013 12:51 AM, "kasper21" [email protected] wrote:

Hi,

I started to get this error and wpaint is not running because of it.

My ..wPaint() call is in a window load function.

Uncaught InvalidStateError: An attempt was made to use an object that is
not, or is no longer, usable. wPaint.js:642
Canvas.getImage wPaint.js:642
Canvas.addUndo wPaint.js:690
(anonymous function) wPaint.js:128
e.extend.each jquery.js?ver=1.7.2:2
e.fn.e.each jquery.js?ver=1.7.2:2
$.fn.wPaint wPaint.js:58
(anonymous function) (index):332
f.event.dispatch jquery.js?ver=1.7.2:3
h.handle.i

any help would be appreciated!


Reply to this email directly or view it on GitHubhttps://github.com//issues/48
.

from wpaint.

kasper21 avatar kasper21 commented on August 15, 2024

yeah I do. I fixed it though. was trying to use resizable canvas but hadn´t updated to 2.0 version.

now I get a different problem with vers 2.x:

Uncaught TypeError: Object bg has no method 'capitalize' wPaint.js:35
createCanvas wPaint.js:35
Paint.generate wPaint.js:82
Paint wPaint.js:20
get wPaint.js:1102
elCreateEach wPaint.js:1091
e.extend.each jquery.js?ver=1.7.2:2
e.fn.e.each jquery.js?ver=1.7.2:2
$.fn.wPaint wPaint.js:1124
(anonymous function) (index):370
f.event.dispatch jquery.js?ver=1.7.2:3
h.handle.i jquery.js?ver=1.7.2:3

from wpaint.

kasper21 avatar kasper21 commented on August 15, 2024

I didn´t realize the new version has plugin files. I linked them now. Like this:
<script type="text/javascript" src="http://rvw.bespokestudio.com/wp-content/themes/proc3ss/js/wPaint.js"></script>

<script type="text/javascript" src="http://rvw.bespokestudio.com/wp-content/themes/proc3ss/js/wPaint.menu.main.min.js"></script> <script type="text/javascript" src="http://rvw.bespokestudio.com/wp-content/themes/proc3ss/js/wPaint.menu.text.min.js"></script> <script type="text/javascript" src="http://rvw.bespokestudio.com/wp-content/themes/proc3ss/js/wPaint.menu.main.shapes.min.js"></script> <script type="text/javascript" src="http://rvw.bespokestudio.com/wp-content/themes/proc3ss/js//wPaint.menu.main.file.min.js"></script>

but now besides this error:
Object bg has no method 'capitalize' wPaint.js:35

I get this error as well:
TypeError: 'undefined' is not a function (evaluating '$("#wPaint").wPaint("resize")')

from wpaint.

websanova avatar websanova commented on August 15, 2024

Can you give short sample of your code.
On Oct 19, 2013 2:04 AM, "kasper21" [email protected] wrote:

I didn´t realize the new version has plugin files. I linked them now. Like
this:

but now besides this error:
Object bg has no method 'capitalize' wPaint.js:35

I get this error as well:
TypeError: 'undefined' is not a function (evaluating
'$("#wPaint").wPaint("resize")')


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-26621461
.

from wpaint.

kasper21 avatar kasper21 commented on August 15, 2024

hey websanova,

no worries. I got it. now a question comes up. I used the resize function and I learned that the canvas does resize
but I looses the currently drawn data. Is there a way of re-initalizing the plugin after window resize?
I tried storing the base64 value in a variable, empty the main #wPaint and call the wPaint() function again with the
stored base64 string as- image: value, but I get an empty canvas.

any help would be greatly appreciated.

thanks,
Kasper

from wpaint.

websanova avatar websanova commented on August 15, 2024

Yes, just call $('#wPaint').wPaint('resize'); after you resize the parent
#wPaint element.
On Oct 21, 2013 12:25 AM, "kasper21" [email protected] wrote:

hey websanova,

no worries. I got it. now a question comes up. I used the resize function
and I learned that the canvas does resize
but I looses the currently drawn data. Is there a way of re-initalizing
the plugin after window resize?
I tried storing the base64 value in a variable, empty the main #wPaint and
call the wPaint() function again with the
stored base64 string as- image: value, but I get an empty canvas.

any help would be greatly appreciated.

thanks,
Kasper


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-26677653
.

from wpaint.

kasper21 avatar kasper21 commented on August 15, 2024

The thing is, that I´ve been using an older version of the plugin, but resize wasn´t a function in that version.
Now, when I update to the latest version I get this error again:

Uncaught TypeError: Object bg has no method 'capitalize' wPaint.js:35

However, I tried the fullscreen.html example and I figured that resizing does resize the canvas but doesn´t redraw proportionally. So this won´t be a solution anyways.

Thanks!

from wpaint.

Related Issues (20)

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.