drag elem image finished, add generate_code.py, too many modify.